Why do I have a sytax error on line 21? (at the if($sql) line) I am new to this and cannot figure it out. I have been spinning my wheels for an hour. I'm sure its something very simple for most people on here.
<?php
$conn = mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("solera_menu",$conn);
if(isset($_POST['submit']))
{
$file = $_FILES['file']['tmp_name'];
$handle = fopen($file,"r");
while(($fileop = fgetcsv($handle,1000,",")) !==false)
{
$order = $fileop[0];
$category = $fileop[1];
$name = $fileop[2];
$description = $fileop[3];
$price = $fileop[4];
$sql = mysql_query("INSERT INTO dinner (order,category,name,description,price) VALUES ('$order','$category','$name','$description','$price')")
if($sql)
{
echo 'Data Uploaded Successfully';
}
}
}
?>