note 34870 added to language.variables.external
| From: | Rizwan at rack1 dot php dot net | Date: | Sat, 09 Aug 2003 11:14:04 +0000 |
| Subject: | note 34870 added to language.variables.external | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-53736@lists.php.net to get a copy of this message | ||
While using the <INPUT TYPE="IMAGE"> with the PHP, keep in mind that Internet
Explorer 6 or earlier do not support the VALUE attribute if the INPUT TYPE is IMAGE. But if you are
using Netscape or Mozilla then you can use the VALUE attribute.
Hence you can not do this in Interent Explorer:
print "<input type=\"image\" name=\"imageView\" value=\"".
$row[0] . src=\"images/viewClient.gif\">";
If you still want to do this in Intenent Explorer then you have to pass a Value to an Image with
Hidden variable like:
print "<input type=\"hidden\" name=\"clientView\" value=\"".
$row[0] . "\">";
print "<input type=\"image\" name=\"imageView\"
src=\"images/viewClient.gif\">";
And on the next script you can get the value of these variables by doing something like:
$myArray = array();
$myArray = $HTTP_POST_VARS;
print_r($myArray);
for ($i=0; $i< count($myArray); $i++)
{
list($key, $value) = each($HTTP_POST_VARS);
if (substr($key, 0, 5) == "image")
{
$image = substr($key, 5, -2);
print "<BR>image: " . $image . "<BR>";
}
}
Hope this helps.
----
Manual Page -- http://www.php.net/manual/en/language.variables.external.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34870
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34870&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34870&report=yes