INSERT INTO user (id, username,email,pass) VALUES ('', 'zubair','a','a')
I am using the GET statements because i am not making this for a website
i am making a Game in TURING [really old programming language ] and its almost impossible to make a game online..so i am using PHP to insert stuff from the game to a database and retract it from the database..using PHP...
dunno if this is a problem or not, but whenever you do a query from phpmyadmin with a autoincrement field, which I assume you have for "id" then it always puts "NULL" in for the id field ie:
PHP Code:
$query= "INSERT INTO user (id,username,email,pass) VALUES (NULL,'$username','$email','$pass')";
(also, have removed random spaces from before both cases of the username.)
To make sure I have the right code I always run a query from phpmyadmin first and then copy the code. I think that if the phpmyadmin code works there is no reason why it won't work un my code.
If it is lower case which it is it is fine. If it was LOCALHOST or Localhost it is looking for a defined constant (define("PIE", $variable)
print PIE; would print what ever the variable $variable is equal too.
I am sorry but that is just complete misinformation. A constant can be lower case as well and localhost in that command should have been in quotation marks.
It is true that most programmers use upper case when defining constants but it is not a requirement.