PHP Nubsauce Posted July 7, 2008 Share Posted July 7, 2008 Can anybody tell me why my slideshowid isent pushing through right? It's sitting in the actual URL just fine. $query = "INSERT INTO slideshow_images (max_image_name, max_image_size, max_image_type, max_image_content, request_id, side_caption, photo_caption, for_sale, approved, slideshow_id) ". "VALUES ('$thumbfileName', '$thumbfileSize', '$thumbfileType', '$thumbcontent', '$_POST[requestid]', '$_POST[sidecaption]', '$_POST[photocaption]', '$_POST[forsale]', 'no', '$_GET[slideshowid]')"; Any help would make me jump with joy. Thanks, Nubsauce. Link to comment https://forums.phpfreaks.com/topic/113602-solved-insert-into-value/ Share on other sites More sharing options...
lemmin Posted July 7, 2008 Share Posted July 7, 2008 Try this for the values part: "VALUES ('$thumbfileName', '$thumbfileSize', '$thumbfileType', '$thumbcontent', '$_POST[requestid]', '$_POST[sidecaption]', '".$_POST[photocaption]."', '$_POST[forsale]', 'no', '$_GET[slideshowid]')"; Link to comment https://forums.phpfreaks.com/topic/113602-solved-insert-into-value/#findComment-583729 Share on other sites More sharing options...
PHP Nubsauce Posted July 7, 2008 Author Share Posted July 7, 2008 No this did not work, but thanks for trying ! php nubsauce Link to comment https://forums.phpfreaks.com/topic/113602-solved-insert-into-value/#findComment-583734 Share on other sites More sharing options...
craygo Posted July 7, 2008 Share Posted July 7, 2008 you need to come out of your quotes when you want to insert $_POST and $_GET values directly. Or put them in brackets you should also use single quotes for the post and get values. I put the values on seperate line to make sure the count was correct, you can return it to normal $query = "INSERT INTO slideshow_images (max_image_name, max_image_size, max_image_type, max_image_content, request_id, side_caption, photo_caption, for_sale, approved, slideshow_id) ". "VALUES ('$thumbfileName', '$thumbfileSize', '$thumbfileType', '$thumbcontent', '".$_POST['requestid']."', '".$_POST['sidecaption']."', '".$_POST['photocaption']."', '".$_POST['forsale']."', 'no', '".$_GET['slideshowid']."')"; Ray Link to comment https://forums.phpfreaks.com/topic/113602-solved-insert-into-value/#findComment-583735 Share on other sites More sharing options...
PHP Nubsauce Posted July 7, 2008 Author Share Posted July 7, 2008 This is now fixed! Thanks all! Link to comment https://forums.phpfreaks.com/topic/113602-solved-insert-into-value/#findComment-583757 Share on other sites More sharing options...
lemmin Posted July 7, 2008 Share Posted July 7, 2008 Woops, I only saw one occurance of that, for some reason. Thanks, craygo, that is what I was trying to get across. Link to comment https://forums.phpfreaks.com/topic/113602-solved-insert-into-value/#findComment-583758 Share on other sites More sharing options...
PHP Nubsauce Posted July 7, 2008 Author Share Posted July 7, 2008 i figured that lemmin, as ray was posting, i was doing what u told me to do on the one of them to all of them Link to comment https://forums.phpfreaks.com/topic/113602-solved-insert-into-value/#findComment-583760 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.