Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\E-COMMERCE\admin\inventory_list.php on line 55
move_uploaded_file($_FILES['fileField']['tmp_name'], "../inventory_images/$newname");
what is t_string error? here is almst full full.
<?php...
$sql = mysql_query("INSERT INTO products (product_name, price, details, category, subcategory, date_added) VALUES('$product_name','$price','$details','$category','subcategory','details', now())")or die("insert error");
$pid = mysql_insert_id(); $newname = "$pid.jpg" move_uploaded_file($_FILES['fileField']['tmp_name'], "../inventory_images/$newname"); ...? <html> .... <form action="inventory_list.php" enctype="multipart/form-data" name="myForm" id="myForm" method="post"> ... <input type="file" name="fileField" id="fileField"/> <input type="submit" name="button" id="button" value="add this item now"> </form> ... </html>
You're missing a semi-colon at the end of line 2.
$newname = "$pid.jpg" //Semi Colon ; missing. FIX IT! And Try Again