Jump to content

can't insert items into an sql table, keep getting error code


svgmx5

Recommended Posts

i'm trying to add items into an sql table via a form, but every time i submit it, i get this error:

 

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''jobID', 'jobTitle', 'startDate', 'price', ' at line 1

 

I've looked over the code and doubled checked the database, to make sure all the fields in the table matched what i had on the script

 

If someone can look over the code and see if they can find anything wrong, i would gladly appreciate it

 

$s_startDate = $_POST['startDate'];
		$s_price = $_POST['price'];
		$s_desc = $_POST['quickDesc'];

		$sql="INSERT INTO mail (jobID, 
								jobTitle, 
								startDate, 
								price, 
								desc) VALUES('$jobID',
											'$job_title',
											'$s_startDate',
											'$s_price',
											'$s_desc')";

		$run = mysql_query($sql) or die(mysql_error());

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.