hello -
im building a backend for users to update a frontend with product specials. i've got two php files doing the work.
inserts.php -> form to fill out, attach picture
sprocess.php -> process the information, inserts to database and renames the picture accordingly
i have another two files for doing the same thing basically but for artists instead of product specials.
inserta.php
process.php
i really just modified the field names in the database and a few of the form references for the product specials, but when i try to submit the inserts.php to call sprocess.php i get the following error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE sprod_id=3' at line 1
i don't really know what to check in the sprocess.php file to track this error down. the line is identical to the one in process.php which works.
process.php lines:
$sql1= "SELECT aimage FROM artist WHERE artist_id = '$artist_id' LIMIT 1";
$reslt2 = mysql_query($sql1, $conn) or die(mysql_error());
$pic=mysql_result($reslt2,0);
$path= "images/artists/$pic";
unlink($path);
sprocess.php lines:
$sql1= "SELECT simage FROM specials WHERE sprod_id = '$sprod_id' LIMIT 1";
$reslt2 = mysql_query($sql1, $conn) or die(mysql_error());
$pic=mysql_result($reslt2,0);
$path= "images/specials/$pic";
unlink($path);
any help would be greatly appreciated as i'm still learning 🙂
thanks,
justin