SUNIL16 Posted February 23, 2011 Share Posted February 23, 2011 Hi Friends, I have form in that i am sending some values using POST method. But i cant able to get values using $_POST['var'] or $_REQEUST['var'] Data is not coming in IE6, But it is coming in firefox and other browsers even in IE8. What may be problem? any settings i have to make for IE6. ? Any suggestions Quote Link to comment https://forums.phpfreaks.com/topic/228570-posted-value-not-showing-in-ie6/ Share on other sites More sharing options...
denno020 Posted February 23, 2011 Share Posted February 23, 2011 Maybe you should use the old, deprecated ways of getting the data? I'm not too familiar with them myself, as I've only recently started PHP programming, however maybe searching Google for the 'old ways' of getting posted variables would do the trick... Denno Quote Link to comment https://forums.phpfreaks.com/topic/228570-posted-value-not-showing-in-ie6/#findComment-1178536 Share on other sites More sharing options...
kenrbnsn Posted February 23, 2011 Share Posted February 23, 2011 Please post your code, without it we're just guessing as to the reason. Ken Quote Link to comment https://forums.phpfreaks.com/topic/228570-posted-value-not-showing-in-ie6/#findComment-1178537 Share on other sites More sharing options...
SUNIL16 Posted February 23, 2011 Author Share Posted February 23, 2011 this is form <form action="foo.php" method="POST"> Name: <input type="text" name="username" /><br /> Email: <input type="text" name="email" /><br /> <input type="submit" name="submit" value="Submit me!" /> </form> in foo.php i am getting values of username and email in firefox but in ie6 i am not getting using $_POST['username'] or using $_REQUEST['username']; Quote Link to comment https://forums.phpfreaks.com/topic/228570-posted-value-not-showing-in-ie6/#findComment-1178544 Share on other sites More sharing options...
cs.punk Posted February 23, 2011 Share Posted February 23, 2011 this is form <form action="foo.php" method="POST"> Name: <input type="text" name="username" /><br /> Email: <input type="text" name="email" /><br /> <input type="submit" name="submit" value="Submit me!" /> </form> in foo.php i am getting values of username and email in firefox but in ie6 i am not getting using $_POST['username'] or using $_REQUEST['username']; You would get these values by $_POST['email']. The 'name' of your input form will corrospond to a key in the $_POST array. Quote Link to comment https://forums.phpfreaks.com/topic/228570-posted-value-not-showing-in-ie6/#findComment-1178550 Share on other sites More sharing options...
kenrbnsn Posted February 23, 2011 Share Posted February 23, 2011 Please post the PHP code. Ken Quote Link to comment https://forums.phpfreaks.com/topic/228570-posted-value-not-showing-in-ie6/#findComment-1178657 Share on other sites More sharing options...
Pikachu2000 Posted February 23, 2011 Share Posted February 23, 2011 If you're using if(isset($_POST['submit'])) to check for form submission, there's a high likelihood that's the problem. Some browsers don't handle the submit button's values properly, especially if the enter key is used rather than clicking the button. Add a hidden field to the form, along the lines of <input type="hidden" name="submitted" value="yes">, then check for it, rather than the submit button, to determine whether the form has been submitted. I do all of my forms this way, and have no problems with it. if( isset($_POST['submitted']) && $_POST['submitted'] == 'yes') ) { Quote Link to comment https://forums.phpfreaks.com/topic/228570-posted-value-not-showing-in-ie6/#findComment-1178664 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.