Jump to content

[SOLVED] Multiple HTML forms on 1 page


SharkBait

Recommended Posts

 

Am I allowed to have multiple forms on a single web page?

 

<form action="search.php" name="meh" method="post">

  <input type="text" name="name" />

  <input type="submit" name="newname" value="Lookup"/>

</form>

<p>Some stuff here</p>

<form action="<?php $_SERVER['PHP_SELF'];?>" method="post" name="blah">

  <input type="text" name="address" />

  <input type="submit" name="newaddress" value="Go" />

</form>

 

With Firefox it works fine. I click on the 'Go' button and the page POSTs into itself. But with IE it will POST into the search.php page which is what I don't want.

 

Am i doing something wrong? Or is IE truely retarded? I find Firefox to be more forgiving when there are little issues with HTML etc.

 

 

Link to comment
Share on other sites

IE 6.

 

Unless I have some weird tag issues happening. (perhaps not a closed tag somewhere?)

 

I am thinking it could be a tag issue because Firefox seems to understand what you're trying to do if things aren't perfect, where as IE freaks out and dies. lol

 

Both forms in the page have opening and closing <form></form> tags.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.