Add a database There's always a problem.
if ($fun ==3) { $row =mysql_fetch_array (mysql_query ("select * from Production ORDER by Prono DESC LIMIT 0,")); $num = $r ow[' Prono '); $num + +; $nums = $num *10+3;echo "Add number: $num Products:
if ($fun%10==3&& $fun!=3) { $num =$_get[' fun ']; $num = ($num-3)/10; $itime =date ("YMD"); if (!empty ($_post[' iproname ')) {echo $itime; $result = "INSERT into Prodution (Prono,proname,prokey,proprice,proplace,sumnum,sugar,fee,calorie,time,picture, Proweight,protype) VALUES (' $num ', ' $_post[iproname ', ' $_post[iprokey] ', ' $_post[iproprice] ', ' $_post[ Iproplace] ', ' $_post[isumnum] ', ' $_post[isugar] ', ' $_post[ifee] ', ' $_post[icalorie ', ' $itime ', ' $_post[ipicture ', ' $_post[iproweight] ', ' $_post[iprotype] ') "; if (!mysql_query ($result, $corn)) echo "Add failed!!"; else echo "Add success!!";}
Database:
Reply to discussion (solution)
int type do not add ' character type to ' you look it up.
Mysql_error provide relevant error information, you do not go to see, blame Which?
$result = "INSERT into Prodution (Prono,proname,prokey,proprice,proplace,sumnum,sugar,fee,calorie,time,picture, Proweight,protype) VALUES (' $num ', ' $_post[iproname ', ' $_post[iprokey] ', ' $_post[iproprice] ', ' $_post[iproplace ', ' $_post[isumnum] ', ' $_post[isugar] ', ' $_post[ifee] ', ' $_post[icalorie] ', ' $itime ', ' $_post[ipicture ', ' $_post[ Iproweight] ', ' $_post[iprotype] ') ";
echo $result;
Output SQL put in MySQL tool execution look
Or
mysql_query ($result, $corn) or Die (Mysql_error ());