Gizzer Posted June 26, 2007 Share Posted June 26, 2007 Hes my site that I used my code on ... http://testgame.awardspace.co.uk/signup.php But it doesnt send the data to the database when I click register. heres my code. $pas = $_POST['password']; $pass = sha1($pas) $user = $_POST['username']; $email = $_POST['email']; $charname = $_POST['charactername']; $passcheck = $_POST['confirmpassword']; $emailcheck = $_POST['confirmemail']; $connection = mysql_connect("*****") or die("Couldn't connect to databse"); mysql_select_db("*****", $connection); mysql_query('Insert into ***** (username,password,email,gamename) values ("'.$user.'","'.$pass.'","'.$email.'","'.$charname.'")',$connection); if (mysql_affected_rows() == 1){ echo "<h1><u><b>You are registered, please feel free to login</font></u></b></h1>"; }else{ echo "<h1><u><b>Username or character name already exists please use a diffrent username or character name</font></u></b></h1>"; I cannot spot any problems with the code but I have only been coding for about 1 month. } } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.