Jump to content

Problem inserting password into field


atticus

Recommended Posts

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

 

 

Link to comment
https://forums.phpfreaks.com/topic/77173-problem-inserting-password-into-field/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.