I get error when try to registrate following one of old youtube videos. To make things short, I get error: "could not register" which comes from reguser.php, from code:
$SQL = "INSERT into players(username, password, email, level, exper, attack, defence, hpoints, maxhp, spoints, maxspoints) VALUES ('$player','$password','$email','1','0','$classquery3[attack]','$classquery3[defence]','$classquery3[hpoints]','$classquery3[hpoints]','$classquery3[spoints]','$classquery3[spoints]')";
mysql_query($SQL) or die("could not register");
But page stays on register.php, if that help anything...
connect.php is:
<?php
$db = mysql_connect("localhost","967798","******") or die("Could not connect to db");
if(!$db)
die("no db");
if(!mysql_select_db("967798",$db))
die("No database selected");
?>
Before I used different registration page, but when I try to insert tabels for classes, I encounter some dificutlys and decide to switch to this from youtube than came across this error.
Thoughts?
registration page
Re: registration page
Use mysql_error to see why the query is failing.
It's also a good idea to output the query itself to see that it actually looks like you think it looks like.
It's also a good idea to output the query itself to see that it actually looks like you think it looks like.
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: registration page
is this right
defence
should it be defense?
defence
should it be defense?