this is part of a file upload script.
here is the section
$datestart = make_date_in();
$datedue = make_date_due();
$filename = $file_name;
$desc = $_POST['desc'];
$type = '1'; //1 = generic assignment
$add_assignment = "INSERT INTO assignments (datein,datedue,filename,desc,type)VALUES('$datestart','$datedue','$filename','$desc','$type')";
$in_to_db = mysql_query($add_assignment) or die('<b>There was a problem adding the entry to the <i>d</i>Base:</b><br>' . mysql_error());
everything works .. the functions that are called work. the file upload part works. but when i attempt to put the information into the db 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 'desc,type)VALUES('2006-07-22','2006-08-10','Visio-software flow
i've checked, double checked, triple checked and DoubleTriple checked. I can't find a problem with the syntax anywhere.
i've echoed all the variables being inserted and they are all correct.
can you see anything wrong with the syntax of the sql statement??
thanks in advance.
chris