Vorotaev Posted April 1, 2006 Share Posted April 1, 2006 First the code in question (just a test case):[code]// This page is receive.php<form action="receive.php" method="post"> <input id="message" type="text" size="16" /> <button type="submit">Submit</button></form><br /><br /><?phpif(!$_POST == NULL) { echo ($_POST['message']);}?>[/code]I've been having quite a bit of trouble with information being sent via form not ending up in the $_POST array. I tried simplifying the script as much as possible, thinking something else in the code was messing it up, but the above is about as barebones as I can make it and still doesn't work.I'm running Apache 2.0.55 with PHP 5.1.2 on Windows XP Home SP2. It may be worthy of note that before upgrading Apache and PHP a few days ago (from 2.0.48 and 5.1.0 respectively), this problem didn't occur. Link to comment https://forums.phpfreaks.com/topic/6336-solved-information-sent-with-form-not-appearing-in-post/ Share on other sites More sharing options...
wildteen88 Posted April 1, 2006 Share Posted April 1, 2006 change [b]id="message"[/b] to [b]name="message"[/b] and you should be fine.Also chnage your PHP block to this:[code]<?phpif(isset($_POST['message'])){ echo $_POST['message'];}?>[/code] Link to comment https://forums.phpfreaks.com/topic/6336-solved-information-sent-with-form-not-appearing-in-post/#findComment-22884 Share on other sites More sharing options...
Vorotaev Posted April 1, 2006 Author Share Posted April 1, 2006 ASDFGHJKL;'.Thank you very, very much. I knew it was something simple, but I just couldn't get it to work.-EDIT-Thanks, I'll use isset from herein. :) Link to comment https://forums.phpfreaks.com/topic/6336-solved-information-sent-with-form-not-appearing-in-post/#findComment-22885 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.