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

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
Kamakazi
Posts: 3
Joined: Sun Jun 23, 2013 11:15 pm

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

Post 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!
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

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

Post 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()); 
Lord Rahl
Posts: 93
Joined: Fri May 17, 2013 2:51 pm

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

Post 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.
Post Reply

Return to “Beginner Help and Support”