Jump to content

[SOLVED] Insert Into, Value


PHP Nubsauce

Recommended Posts

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

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

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.