this insert coding
i get this error message when in insert the data"Database query failed: 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 'add,city, date, image) VALUES ('car for sale','mp','car for sale', '0115478956',' at line 1"
i cant find what wrong in my coding.
if (isset($_FILES['file']) && $_FILES['file']['size'] > 0) {
// Temporary file name stored on the server
$title = $_POST['title'];
$catergory = $_POST['catergory'];
$des = $_POST['des'];
$phone=$_POST['phone'];
$add = $_POST['add'];
$city = $_POST['city'];
$currentDate = date("F j, Y");
$tmpName = $_FILES['file']['tmp_name'];
// Read the file
$fp = fopen($tmpName, 'r');
$data = fread($fp, filesize($tmpName));
$data = addslashes($data);
fclose($fp);
$result = mysql_query("INSERT INTO upload (title, catergory, des, phone,add,city, date, image) VALUES
('$title','$catergory','$des', '$phone','$add','$city','$currentDate','$file')",$conn);
if(!$result)
{
die("Database query failed: ". mysql_error());
}
// Print results
print "Thank you, your file has been uploaded.";
}
?>