Hi sorry that the line is big. can you help? thanks in advance Parse error: syntax error, unexpected ')', expecting ']' in /home/rooyekha/public_html/laklak4u.net/javad/addproduct.php on line 9 that is: $insert=mysql_query("INSERT INTO `products` (productName, productDescription, productColour, productLeadTime, productImage1, productImage2, productImage3, productQuantity1, productQuantity2, productQuantity3, productQuantity4, productQuantity5, productBranding1, productBranding2, productBranding3, productBranding4, productPrice11, productPrice21, productPrice31, productPrice41, productPrice51, productPrice12, productPrice22, productPrice32, productPrice42, productPrice52, productPrice13, productPrice23, productPrice33, productPrice43, productPrice53, productPrice14, productPrice24, productPrice34, productPrice44, productPrice54, SupplierID, productSupplierCode) VALUES ('" . mysql_real_escape_string($_POST['productName']) . "','" . mysql_real_escape_string($_POST['productDescription']) . "','" . mysql_real_escape_string($_POST['productColour'] ) . "','" . mysql_real_escape_string($_POST['productLeadTime'] ) . "','" . mysql_real_escape_string($_POST['productImage1']) . "','" . mysql_real_escape_string($_POST['productImage2']) . "','" . mysql_real_escape_string($_POST['productImage3']) . "','" . mysql_real_escape_string($_POST['productQuantity1']) . "', '" . mysql_real_escape_string($_POST['productQuantity2']) . "','" . mysql_real_escape_string($_POST['productQuantity3']) . "','" . mysql_real_escape_string($_POST['productQuantity4']) . "','" . mysql_real_escape_string($_POST['productQuantity5']) . "','" . mysql_real_escape_string($_POST['productBranding1']) . "','" . mysql_real_escape_string($_POST['productBranding2']) . "','" . mysql_real_escape_string($_POST['productBranding3']) . "','" . mysql_real_escape_string($_POST['productBranding4') . "','" . mysql_real_escape_string($_POST['productPrice11']) . "','" . mysql_real_escape_string($_POST['productPrice21']) . "','" . mysql_real_escape_string($_POST['productPrice31']) . "','" . mysql_real_escape_string($_POST['productPrice41']) . "','" . mysql_real_escape_string($_POST['productPrice51']) . "','" . mysql_real_escape_string($_POST['productPrice12']) . "','" . mysql_real_escape_string($_POST['productPrice22']) . "','" . mysql_real_escape_string($_POST['productPrice32']) . "','" . mysql_real_escape_string($_POST['productPrice42']) . "','" . mysql_real_escape_string($_POST['productPrice52']) . "','" . mysql_real_escape_string($_POST['productPrice13']) . "','" . mysql_real_escape_string($_POST['productPrice23']) . "','" . mysql_real_escape_string($_POST['productPrice33']) . "','" . mysql_real_escape_string($_POST['productPrice43']) . "','" . mysql_real_escape_string($_POST['productPrice53']) . "','" . mysql_real_escape_string($_POST['productPrice14']) . "','" . mysql_real_escape_string($_POST['productPrice24']) . "','" . mysql_real_escape_string($_POST['productPrice34']) . "','" . mysql_real_escape_string($_POST['productPrice44']) . "','" . mysql_real_escape_string($_POST['productPrice54']) . "','" . mysql_real_escape_string($_POST['supplierID']) . "','" . mysql_real_escape_string($_POST['productSupplierCode']) ) or die(mysql_error()); PHP:
There is your problem. either that or try taking the quotes out of everything. Or and not In other words, you started your values wrongly. you need to take out the period at the beginning, after that only have them after a variable. (or function(variable) it doesnt really matter) Also if you wanted you could make everything a variable before it is put into use. Instead of having before the mysql query put etc.