ninedoors Posted May 18, 2008 Share Posted May 18, 2008 I get an error when I run this query: mysql_query("INSERT INTO gallery_photos (photo_filename, photo_caption, photo_category ) VALUES ('0', '" . $photo_captions[$counter]) . "', '" . $_POST['category'] . "')"); This is the error I get: Parse error: syntax error, unexpected ')' in /home/bigc/public_html/photos/upload.php on line 32 I can't see then extra ')'. Nick Link to comment https://forums.phpfreaks.com/topic/106204-solved-query-error/ Share on other sites More sharing options...
p2grace Posted May 18, 2008 Share Posted May 18, 2008 try this: mysql_query("INSERT INTO `gallery_photos` (`photo_filename`, `photo_caption`, `photo_category` ) VALUES ('0', '" . $photo_captions[$counter] . "', '" . $_POST['category'] . "')"); The extra ) was after the first $counter variable Link to comment https://forums.phpfreaks.com/topic/106204-solved-query-error/#findComment-544354 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.