468,272 Members | 2,045 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,272 developers. It's quick & easy.

Post to self?

if test.php is this file:
<?php
$lang = $_POST["lang"];
print $lang;
?>

<form method=post action=test.php>
<input type=image src=engFlag.jpg name="lang" value=en>
<input type=image src=fraFlag.jpg name="lang" value=fr>
</form>

Why won't it print $lang; after having one of the images clicked?
Sep 2 '06 #1
2 1510
On Sat, 02 Sep 2006 20:07:21 GMT, Jon Pike <an********@spamless.comwrote:
>if test.php is this file:

<?php
$lang = $_POST["lang"];
print $lang;
?>
<form method=post action=test.php>
<input type=image src=engFlag.jpg name="lang" value=en>
<input type=image src=fraFlag.jpg name="lang" value=fr>
</form>

Why won't it print $lang; after having one of the images clicked?
Does here on Firefox.

But on Internet Explorer it only posts "lang_x" and "lang_y" for the
coordinates of the click.

http://www.w3.org/TR/html4/interact/forms.html#h-17.4.1

The "." from the standard is transformed by PHP into "_".

IE's behaviour here is very unhelpful, and probably a violation of the
standard; it says the x and y are included in the submitted data, but doesn't
say to eliminate the original name/value pair.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Sep 2 '06 #2
Andy Hassall <an**@andyh.co.ukwrote in
news:m5********************************@4ax.com:
On Sat, 02 Sep 2006 20:07:21 GMT, Jon Pike <an********@spamless.com>
wrote:
>>if test.php is this file:

<?php
$lang = $_POST["lang"];
print $lang;
?>
<form method=post action=test.php>
<input type=image src=engFlag.jpg name="lang" value=en>
<input type=image src=fraFlag.jpg name="lang" value=fr>
</form>

Why won't it print $lang; after having one of the images clicked?

Does here on Firefox.

But on Internet Explorer it only posts "lang_x" and "lang_y" for the
coordinates of the click.

http://www.w3.org/TR/html4/interact/forms.html#h-17.4.1

The "." from the standard is transformed by PHP into "_".

IE's behaviour here is very unhelpful, and probably a violation of
the
standard; it says the x and y are included in the submitted data, but
doesn't say to eliminate the original name/value pair.
Ah, very clear, thank you!
Sep 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Thomas Philips | last post: by
3 posts views Thread by Premshree Pillai | last post: by
2 posts views Thread by Raaijmakers, Vincent (GE Infrastructure) | last post: by
reply views Thread by Pieter Edelman | last post: by
16 posts views Thread by Andy Lai | last post: by
6 posts views Thread by test | last post: by
1 post views Thread by Christopher J. Bottaro | last post: by
4 posts views Thread by Wolfgang Draxinger | last post: by
1 post views Thread by mark starnes | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.