Page 1 of 1

Stuck on vals tutorial ( video 3b ) {reguser.php}

Posted: Tue Jun 25, 2013 4:27 am
by Kamakazi
Hey when i enter everything to register correctly it says "could not register" which i'm guessing is to do with

$SQL = "INSERT into players(name, password, email, level, exper) VALUES ('$player','$password','$email','1','0'";
mysql_query($SQL) or die("could not register");

could anyone tell me why this is please, would really appreciate any help!

Re: Stuck on vals tutorial ( video 3b ) {reguser.php}

Posted: Tue Jun 25, 2013 2:15 pm
by hallsofvallhalla
do not quote your numbers first off.

try this

Code: Select all

$SQL = "INSERT into players(name, password, email, level, exper) VALUES ('$player','$password','$email',1,0";
mysql_query($SQL) or die(mysql_error()); 

Re: Stuck on vals tutorial ( video 3b ) {reguser.php}

Posted: Tue Jun 25, 2013 4:23 pm
by Lord Rahl
Well I understand you don't want to show errors to the normal user using mysql_error() often helps solve this kind of problem.