...

View Full Version : _POST in IE



ole90
12-28-2007, 12:21 AM
echo"<form action='game_questiontime.php?action=submitanswer' method='post'><input type='hidden' name='id' value='$qid'><input type='text' name='answer'><br><input type='submit' name='submitt' value='Submit'></form><br><br><b>Note: You only get one guess.</b><br></center></td></tr></table>";
}

if($action == "submitanswer") {
if(!isset($_POST['submitt'])) {
$input="No form.";
error($input);
}
} ...

For some reason, when i submit the form in firefox it works, but when i submit it in IE it doesn't. Any ideas?

PappaJohn
12-28-2007, 01:25 AM
note the spelling:
if(!isset($_POST['submitt']))

Inigoesdr
12-28-2007, 04:57 AM
note the spelling:
if(!isset($_POST['submitt']))
Yes, note the spelling:


<input type='submit' name='submitt' value='Submit'>


For some reason, when i submit the form in firefox it works, but when i submit it in IE it doesn't. Any ideas?
Change $action to $_GET['action'] for one. Also, you should be using double-quotes for your HTML code.

PappaJohn
12-28-2007, 04:58 AM
Yes, note the spelling:
heh, my bad

CFMaBiSmAd
12-28-2007, 05:27 AM
The action parameter is a $_GET anyway - game_questiontime.php?action=submitanswer One would hope that there is an assignment statement that is setting $action earlier in the code or that register globals are on, otherwise the code would never work for any browser.

When a form works in one browser and not another it us usually due to invalid markup that one browser ignores so that it sees the form and the other browser sees as invalid so that it does not fully render the form.

There are a bunch of table tags at the end of the posted echo statement. I suspect that the markup is invalid and is causing the form to not function in one of the browsers and/or there is something like invalid nested forms...

BTW: The posted code works in IE and FF (accounting for the need to set $action = $_GET['action']). That would indicate that something else in the code is the problem.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum