[thelist] Can't submit form data with 'enter' key in IE

Max Schwanekamp lists at neptunewebworks.com
Wed Mar 8 00:15:01 CST 2006


Jim Davis wrote:
> I am using <input name="submit" type="submit" value="Submit">.
> http://www.previewp.com/roster/roster_searchall.php?agent_name=&submit=Submit

Your php script is apparently looking for $_GET['submit'].  Submitting 
the form without clicking Submit in IE sends the text field, but not the 
submit value, whereas FF and others will include the submit value by 
default (IE's behavior seems more correct to me in this case).  Try 
something like:
<?php
if (!empty($_GET) && $_GET['agent_name']) {
	//do the search
} else {
	//show error msg, ignore request, etc.
}
?>

HTH
-- 
Max Schwanekamp
http://www.neptunewebworks.com/



More information about the thelist mailing list