Does anyone know what this error could be referring to? Error: Column count doesn't match value count at row 1 I have checked my code over and over and it seems right is this mySQL or the php giving this error? It comes up when I hit submit on a form. Below is the form and then the page that is supposed to add it to the mysql table. <form action="registerbridge.php" method="post"> First Name: <input type="text" name="fname"><br> Last Name: <input type="text" name="lname"><br> Email: <input type="text" name="email"><br> Country: <input type="text" name="country"><br> <br> Gangsters Name: <input type="text" name="pname"><bR> Password: <input type="password" name="pword"><br> Referred by: <input type="text" name="referal"><br> <input type="submit" value="Register"> </form> Code (markup): <?php $dbserver = "localhost"; $dblogin = "xxxxxxx"; $dbpassword = "xxxxxxxx"; $dbname = "xxxxxxxx"; $con = mysql_connect("$dbserver","$dblogin","$dbpassword"); if (!$con) { die('Could not connect to the mySQL server please contact technical support with the following information: ' . mysql_error()); } mysql_select_db("$dbname", $con); $sql="INSERT INTO users (playerid, playername, password, email, firstname, lastname, country, referrals) VALUES ('$_POST[pname]','$_POST[pword]','$_POST[email]','$_POST[fname]','$_POST[lname]','$_POST[country]','$_POST[referrals]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Thank you for registering"; mysql_close($con); ?> Code (markup):
Tri this: <?php $dbserver = "localhost"; $dblogin = "xxxxxxx"; $dbpassword = "xxxxxxxx"; $dbname = "xxxxxxxx"; $con = mysql_connect("$dbserver","$dblogin","$dbpassword"); if (!$con) { die('Could not connect to the mySQL server please contact technical support with the following information: ' . mysql_error()); } mysql_select_db("$dbname", $con); $sql="INSERT INTO users (playerid, playername, password, email, firstname, lastname, country, referrals) VALUES ('','$_POST[pname]','$_POST[pword]','$_POST[email]','$_POST[fname]','$_POST[lname]','$_POST[country]','$_POST[referrals]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Thank you for registering"; mysql_close($con); ?> PHP: