Jump to content

Posted value not showing in IE6


SUNIL16

Recommended Posts

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

Link to comment
Share on other sites

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'];

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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') ) {

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.