Back Story: I’m making a game using Construct 2 and i’m trying to make a server based login system, the game accesses a PHP page and from a return determines if login details are correct and returns some info in regards to the user.
Ok so the PHP page is accessed and sent the user name and password eg(“ANDY and PASS”), then php code gets the username and password from an SQL database. The problem is when edit the SQL request to only return results where the username = the username input into the php script it returns no values. I’ve returned all the values from the table and the echo’ed them and they are the same but still it won’t do it. I’ve managed to do the same thing for a ID number using
[php]
$sql = mysql_query("SELECT TITLE
FROM Board
WHERE ID_NUM
=$ID_NUM AND TITLE
IS NOT NULL LIMIT 0, 1 ");
[/php]
So i used the same code again for what i want to do with the Username
[php]
$sql = mysql_query(‘SELECT USER
, PASSWORD
FROM Users
WHERE PASSWORD
IS NOT NULL’);
[/php]
I know its accessing the database as without the “WHERE USER = USER” it returns the values from the database and i know the values compared are the same as when i get them they are identical . I don’t understand :/, do you have to do something with strings different to numbers in PHP or SQL any help will be great
Thanks