Jump to content

Submit Button Issue IE7


IComic

Recommended Posts

Hey Guys,

 

I have been stuck on this one issue for a few hours, I have been googling for help but no luck, thought I would try my luck here if anyone had any idea.

 

I have a simple form,

 

 

if(isset($HTTP_POST_VARS['ConfirmInfo'])) // tried $_POST as well.

{

    echo "Test";

}

 

 

echo "<form method="POST" action=\"$_SERVER[php_SELF]\">";

echo "<input type=\"text\" name=\"PaymentChoice\" />";

echo "<input type=\"image\" src=\"$FolderDepth/Images/Webs/Cancel.jpg\" value=\"Cancel\" name=\"Cancel\"/>";

echo "<input type=\"image\" src=\"$FolderDepth/Images/Webs/Confirm.jpg\" value=\"Confirm\" name=\"ConfirmInfo\"  />";

echo "</form">;

 

 

 

The problem I am having is, I can submit the form in FireFox, but not in IE what gives? I have noticed when printing out the array of $_POST variables, the button field is not in there. I have tried changing it to just a submit button but no luck either. In FireFox, if I print out the array of $_POST I can see the button field and its value displayed.

 

If I tried this

 

echo $HTTP_POST_VARS['PaymentChoice'];

 

it would print out fine.

 

I didnt display the entire script its is long.

 

Any help ?

 

Thanks.

 

 

Sukh

Link to comment
Share on other sites

<?php
print_r($_POST);

/*
if(isset($_POST['ConfirmInfo'])) // tried $_POST as well.
{
    echo $_POST['ConfirmInfo'];
}
*/
?>
<form method="post" action="<?php echo $_SERVER[php_SELF]; ?>">
<input type="text" name="PaymentChoice" />
<input type="image" src="<?php echo $FolderDepth; ?>"/Images/Webs/Cancel.jpg" value="Cancel" name="Cancel" />
<input type="image" src="<?php echo $FolderDepth; ?>/Images/Webs/Confirm.jpg" value="Confirm" name="ConfirmInfo"  />
</form">

 

you are using an image input - this is handled differently in browsers - print out the entire post array and you will see which browsers report what.  Some will return the x y coordinate of where the image was clicked others just the value...

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.