Jump to content


Photo

$_REQUEST doesn't get anything...

php mysql remote connection request

  • Please log in to reply
5 replies to this topic

#1 koalas

koalas

    Newbie

  • Members
  • 2 posts

Posted 10 February 2018 - 09:09 PM

I'm making a login system for Unity, and I'm using your hosting website for online testing because it worked in localhost. I uploaded my 2 PHP files that are attached on the bottom and then when I test the login system in Unity it says "Empty" on the registration and "Username or Password cannot be empty." which means that $_REQUEST is not getting any information from the game.

 

I would like a quick answer on how to fix this (it is not an error in the code, definitely)

Attached File  login.php   1.31K   4 downloads

Attached File  register.php   1.04K   0 downloads



#2 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 18,932 posts
  • Gender:Male

Posted 10 February 2018 - 09:27 PM

It's probably this: https://stackoverflow.com/a/5701703

#3 Luigi123

Luigi123

    Rank X Member

  • Moderators
  • 1,843 posts
  • Gender:Male
  • Location:Winnipeg, Manitoba, Canada

Posted 11 February 2018 - 01:44 AM

Moved to Customer Service.


Posted ImagePosted ImagePosted Image
Posted ImagePosted ImagePosted Image

#4 mrj

mrj

    Rank IV Member

  • Members
  • PipPipPipPip
  • 276 posts
  • Gender:Male
  • Location:Bangladesh

Posted 14 February 2018 - 08:40 AM

If you are getting informations from a HTML form, then try using $_POST or $_GET instead of $_REQUEST
$_GET Not recommended for your script because of security reasons)
From php documentation:
The variables in $_REQUEST are provided to the script via the GET, POST, and COOKIE input mechanisms and therefore could be modified by the remote user and cannot be trusted. The presence and order of variables listed in this array is defined according to the PHP variables_order configuration directive.


#5 koalas

koalas

    Newbie

  • Members
  • 2 posts

Posted 17 February 2018 - 01:40 PM

anddd.... how could I find php.ini in the file manager?



#6 mrj

mrj

    Rank IV Member

  • Members
  • PipPipPipPip
  • 276 posts
  • Gender:Male
  • Location:Bangladesh

Posted 17 February 2018 - 02:22 PM

You can not find php.ini file. Because it's in outside of your document root. You can not get or edit that file. Only admins can edit this file. And all users are set to use the same file. So php settings for all users are same.





Also tagged with one or more of these keywords: php, mysql, remote connection, request

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users