Jump to content

POST data disapearing?


tallberg

Recommended Posts

Ive an incongruable problem. the post data  seems to turn in to nothing when sent to the db.
However also SETthe image_id feild then it works i dont want to change that feild.???????


[code]
echo $_POST["the_description"]; /// Why does it echo out here but does not pass to the db.

        $description = $_POST["the_description"];

$query = "UPDATE hp_additional_images SET feild = '$description' WHERE image_id =". $_GET["id"];

mysql_query($query) or die (mysql_error());[/code]
Link to comment
https://forums.phpfreaks.com/topic/35853-post-data-disapearing/
Share on other sites

This is the query as it is now.

[code]echo $_POST["in_description"] ; // this works fine.

$query = "UPDATE hp_additional_images SET adescription = '". $_POST["in_description"] . "' WHERE image_id = " . $_GET["id"]; // now the value of $_POST["in_description"] is blank?[/code]

If you want to help me prevent sql injection great! but i need to understand why this is now working. I seem like a bug or something?
Link to comment
https://forums.phpfreaks.com/topic/35853-post-data-disapearing/#findComment-169990
Share on other sites

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.