From: jordanolsommer at imap dot cc
Operating system: Windows XP
PHP version: 4.3.2
PHP Bug Type: Variables related
Bug description: form buttons of type "image" dont send "submit" $_POST variable in IE

Description:
------------
I don't see how this wouldn't be a common bug, nonetheless I couldn't find
it in the database..

when using an input of type "image" (i.e. you want to use an image of your
own to submit a form instead of the ubiquitous submit button), submitting
a POST, three variables should be transferred = the value of the submit
button you clicked, and the x and y coordinates of where on that
particular button you clicked.

Mozilla gets all three variables in the $_POST associative array no
problem; for some reason Internet Explorer (I have version
6.0.2800.1106.xpsp2.030422-1633) does not get the value variable, only the
two coordinates.

While in practical terms the problem is not huge (after all, the name is
still located in the x and y coordinate associative array keys), but a) it
seems like this might be a problem for quite a few others, and b) grabbing
the names from the x and y vars is both inelegant and a slight PITA.

a quick phpinfo() shows that it doesnt seem to be a syntactic or semantic
error, the $_POST array just isnt being given that value in IE.

any suggestions?

Reproduce code:
---------------
//calling form

<form action="form.php" method="post">

<input name="foo" type="image" value="submit" src="foobutton.jpg">

</form>


// form.php

foreach( $_POST as $key => $value ) {
echo $key."=>".$value."<br>";
}

Expected result:
----------------
What should happen:

foo => submit
foo_x => 100 //x-coord.
foo_y => 55 // y-coord.

Actual result:
--------------
What does happen:

// $_POST["foo"] doesnt exist, but only in IE
foo_x => 100 //x-coord.
foo_y => 55 // y-coord.

--
Edit bug report at [url]http://bugs.php.net/?id=25366&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25366&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25366&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25366&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25366&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25366&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25366&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25366&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25366&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25366&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25366&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25366&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25366&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25366&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25366&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25366&r=gnused[/url]