IComic Posted January 17, 2009 Share Posted January 17, 2009 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 Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted January 17, 2009 Share Posted January 17, 2009 <?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... Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted January 17, 2009 Share Posted January 17, 2009 All browsers report the x,y coordinates and that is what should be used (or just use a hidden field with a value.) Only some browsers send the value="..." parameter. http://www.phpfreaks.com/forums/index.php/topic,233261.msg1084566.html#msg1084566 Quote Link to comment Share on other sites More sharing options...
IComic Posted January 18, 2009 Author Share Posted January 18, 2009 Thanks, the link from the other page that leads to PHP.net does not work thou, just letting you know. Thanks. Quote Link to comment 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.