From: develop at in-tech dot us
Operating system: Windows XP Pro, Windows 2000 Svr
PHP version: 4.4.4
PHP Bug Type: *General Issues
Bug description: POST problem with input image
Description:
------------
Using: I.E. 6, Firefox 2.0.0.1 and Opera 9, PHP 4.4.4, IIS 5.1 on XP PRO
(development machine) and IIS 5 on Windows 2000 Server (production
server).
When using an input type of 'image' to submit a form, the name value is
not initialized by my switch() script. If I change this to a standard
input type of 'submit', the variable is initialized and recognized just
fine:
Reproduce code:
---------------
//DOES NOT work
<input type="image" src="/images/pic.jpg" name="somevalue" />
if(!empty($_POST['somevalue'])) {
switch($_POST['hiddenfieldname']) {
case 'somecase':
include 'page1.php';
break;
}
}
else {
include 'page2.php';
}
//Works Fine
<input type="submit" name="somevalue" value="Submit" />
if(!empty($_POST['somevalue'])) {
switch($_POST['hiddenfieldname']) {
case 'somecase':
include 'page1.php';
break;
}
}
else {
include 'page2.php';
}
Expected result:
----------------
Script should include() page1.php
Actual result:
--------------
Includes() page2.php
--
Edit bug report at http://bugs.php.net/?id=40426&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=40426&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=40426&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=40426&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40426&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=40426&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40426&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40426&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40426&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40426&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40426&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=40426&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=40426&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40426&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40426&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40426&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40426&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40426&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40426&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40426&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40426&r=mysqlcfg