Im having some trouble here with my code. Im trying to insert text from a form inot a mysql database, but im getting some errors, I cannot find out why its doing this, maybe you guys can see somthing I overlooked..
Error message:
1064: You have an error in your SQL syntax near '/O='Retail', DA_Price='3', DA_Stock='Yes', DA_Image='3', DA_Manufactory='AMD' at line 5
code:
require("../cfg.php");
$connect2 = mysql_connect($hostname, $user_name, $user_pass) or die ("<b><center>".mysql_errno().": ".mysql_error()."</b></center>\n");
$db2 = mysql_select_db($database, $connect2) or die ("<b><center>".mysql_errno().": ".mysql_error()."</b></center>\n");
$sql3 = "INSERT INTO ".$ext."goods SET
".$ext."Category='".$_REQUEST["cat"]."',
".$ext."Desc='".$_REQUEST["desc"]."',
".$ext."Brand='".$_REQUEST["product"]."',
".$ext."R/O='".$_REQUEST["ro"]."',
".$ext."Price='".$_REQUEST["price"]."',
".$ext."Stock='".$_REQUEST["stock"]."',
".$ext."Image='".$_REQUEST["image"]."',
".$ext."Manufactory='".$_REQUEST["man"]."',
".$ext."Product='".$_REQUEST["url"]."'";
//$sql3 = "INSERT INTO ".$ext."goods SET DA_Desc = '".$_REQUEST["desc"]."', Brand = '".$_REQUEST["product"]."', Category = '".$_REQUEST["cat"]."'";
$sql_result3 = mysql_query($sql3, $connect2) or die ("<b><center>".mysql_errno().": ".mysql_error()."</b></center>\n");
mysql_close($connect2);