Jump to content


Photo

Why wont isset work in IE?


  • Please log in to reply
3 replies to this topic

#1 Madatan

Madatan
  • Members
  • PipPipPip
  • Advanced Member
  • 51 posts

Posted 19 June 2006 - 01:23 PM

This is weird, i'm having problems with
if(isset($_POST['submit']))
to work with IE and Opera. Works perfectly with FireFox. Any clue why?

#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 19 June 2006 - 01:41 PM

There is not such a thing like "isset doesn't work with BROWSER_HERE".
PHP is server-sided.

What happens is, if you don't give a name and a value for your submit button, IE just won't POST it. You can either give it a name (like "submit") or add a hidden field:

<input type="submit" name="submit" value="Hi!">
<input type="hidden" name="send" value="yes">

~ D Kuang

#3 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 19 June 2006 - 01:57 PM

If you're using an image as the input type, you'll have to reference it as $_POST['submit_x'] or $_POST['submit_y'] instead of $_POST['submit'] as IE sends the coordinates of the click rather than the elements name. Other than that, I'd go along with poirot.

#4 Madatan

Madatan
  • Members
  • PipPipPip
  • Advanced Member
  • 51 posts

Posted 19 June 2006 - 02:23 PM

ah, thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users