Jump to content

$_REQUEST doesn't get anything...


koalas

Recommended Posts

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)

login.php

register.php

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...