Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form submission does not work on MSIE

Status
Not open for further replies.

jimoblak

Instructor
Oct 23, 2001
3,620
US
I have a really basic form (index.php) that works in at least Mac Safari and Windows Firefox & Opera. It does not work in Windows Internet Explorer. Suggestions are welcomed.

Code:
<form id="FormName" action="index.php" method="get" name="FormName"><button name="button" value="submitted" type="submit">Submit</button></form>

The same index.php file contains the following form processing:

Code:
<?php
if ($_GET[button]=="submitted") {
print ("submitted successfully");
}
?>

MSIE does not seem to recognize the button value and return the PHP result. Why?
 
IE submits a value. Just not the exact value you want.

The question is, do you want to check for a specific value, or do you want to check that the button was clicked and the form submitted?

If the latter, I recommend you actually check for the presence of the submitted value, not what the value is:

if (isset($_GET['button']))
{
print ('submitted successfully');
}



Want the best answers? Ask the best questions! TANSTAAFL!
 
Thanks for the info. It has fixed the problem but I am interested in further study. Is this an issue with PHP or MSIE? I am seeing ASP tutorials throughout the internet where the button's "value" is defined with different variables with no problem.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top