471,603 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,603 software developers and data experts.

Input Submit not passing over correctly in IE7

nathj
938 Expert 512MB
Hi,

I really need some help with this as I've been looking at it for over a day now and I'm sure its really simple.

The problem is that I have 3 forms each of which posts to thankyou.php. The php then handles the data depending on the value of $_POST['type'].

$_POST['type'] is set on each of the forms in the following way
[HTML]
<!--individual registration -->
<div id="register"><input type="submit" name="type" value="Register"></div>

<!-- Church registration -->
<div id="register"><input type="submit" name="type" value="Church Registration"></div>

<!-- Order Form -->
<div id="register"><input type="submit" name="type" value="Order"></div>
[/HTML]

Each of these is on a separate page.

On thankyou.php I use a switch statement to determine which form has been completed and then set the email message accordingly. This all works fine on FF2 and Opera9. For IE7 the church regristration form works a treat but the others don't. I have echo'd the $_POST['type'] oat the top of the page and it comes out fine for all 3 under FF and O but for IE7 it only works for Church Registration.

I am guessing the problem is within the lines I have shown above, but this is a guess. I would really appreciate some help on this as I have been pulling my hair out with it.

Many thanks
nathj
Sep 27 '07 #1
1 2111
nathj
938 Expert 512MB
Hi,

Well, I still have no idea why what I had explained previously wouldn't work on IE7 but I have at least come up with a fudge.

The solution was to add a hidden element to the form and then test on the value of that as the $_POST array was populated fine.

I know this is a fudge and normally I would not do such things as they are lazy and horrible. However, the site in question is due for an overhaul next year so I figure I'll use the fudge and move on with more urgent matters.

Cheers
nathj
Sep 27 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Jay | last post: by
16 posts views Thread by Ben Sharvy | last post: by
1 post views Thread by Ilya N. Golubev | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.