atticus Posted November 13, 2007 Share Posted November 13, 2007 I am having problems with this query: $username = $_POST['username']; $password = $_POST['password']; $query = "INSERT INTO cust (cust_id, cust_password) VALUES ('$username', PASSWORD('$password');"; mysql_query($query) or die('Error, insert query failed' . mysql_error()); Error: Error, insert query failedYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 13, 2007 Share Posted November 13, 2007 should be query = "INSERT INTO cust (cust_id, cust_password) VALUES ('$username', PASSWORD('$password'))"; you forgot the ) 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.