Unknown column 'name' in 'field list' with registration

Ok, so I am creating an online multiplayer game and I have created the registration form.I couldn't really notice any problems with the code and was wondering if I could get some help.I write the username, password, email and I click "Register" and it comes up "Unknown Column 'name' in 'field list' Thank you:\[code\]<?PHP//Database Information$dbhost = "databasehost";$dbname = "databasename";$dbuser = "databaseusername";$dbpass = "datebasepassword";//Connect to databasemysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());mysql_select_db($dbname) or die(mysql_error());$name = $_POST['name'];$email = $_POST['email']; $username = $_POST['username'];$password = ($_POST['password']);// lets check to see if the username already exists$checkuser = mysql_query("SELECT username FROM users WHERE username='$username'");$username_exist = mysql_num_rows($checkuser);if($username_exist > 0){ echo "That name already exists.Try another"; unset($username); include 'registration.html'; exit();}// lf no errors present with the username// use a query to insert the data into the database.$query = "INSERT INTO users (name, email, username, password)VALUES('$name', '$email', '$username', '$password')";mysql_query($query) or die(mysql_error());mysql_close();echo "You are now registered!!!";// mail user their information$yoursite = 'www.foodworldvw.tk';$webmaster = 'Jordan';$youremail = '[email protected]';$subject = "Thanks for registering at our website :)";$message = "$username, you are now registered on Food World To login, simply go to http://foodworldplay.tk and enter in the following details in the login form: Username: $username Password: $password $webmaster";mail($email, $subject, $message, "From: $yoursite <$youremail>\nX-Mailer:PHP/" . phpversion());echo "Thank you for registering with Food World.More information has been sent to your E-mail";\[/code\]
 
Back
Top