Reputation: 1808
I'm trying to allow users to register with the site I am creating, however the code I am using is not working and I need you're help.
$registerquery = mysql_query("INSERT INTO users (Username, Password, EmailAddress) VALUES('".$username."', '".$password."', '".$email."'");
Database: alt text http://img248.imageshack.us/img248/2457/screenshot20100805at001.png
I only want to store the Username, Password and Email Address at this stage.
Upvotes: 0
Views: 838
Reputation: 1504
You are missing the closing bracket in your SQL query. Try this line:
$registerquery = mysql_query("INSERT INTO users (Username, Password, EmailAddress) VALUES('".$username."', '".$password."', '".$email."')");
Note the ) at the end: "')");
Upvotes: 0
Reputation: 2213
You're missing a ) at the end of the query.
$registerquery = mysql_query("INSERT INTO users (Username, Password, EmailAddress) VALUES('".$username."', '".$password."', '".$email."')");
Upvotes: 7
Reputation: 201
$registerquery = mysql_query("INSERT INTO `users` (`Username`, `Password`, `EmailAddress`) VALUES ('".$username."', '".$password."', '".$email."')");
Upvotes: 0