|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-02-10 00:55 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Apr 01 02:00:02 2026 UTC |
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