Using $_POST with an image as the submit button
Posted: Tue Apr 15, 2003 6:14 am
[admin edit: moved from the register_globals sticky thread]
i have read thru this a few times, but am still having problems using both post and get methods.
neither method seems to work when the input type is image. or mabey im just doing something wrong.
now this code works in mozilla / phoenix. when you click the home button, it changes the home = nope to home = ok. however in IE it doesn't work. the reason is the value of each button isn't passed for some reason in IE.
mozilla url = http://www.garagelan.com/test/test.php? ... &Home=Home
IE url =
http://www.garagelan.com/test/test.php? ... &Home.y=13
two questions:
why is it passing x.y coordinates in the url?
and why doesn't IE pass the value of the input?
im stumped, any help would be muchly appreciated. i have tried using $_REQUEST $_POST and $_GET along with post and get method forms.. all have the same result.
thx
i have read thru this a few times, but am still having problems using both post and get methods.
neither method seems to work when the input type is image. or mabey im just doing something wrong.
Code: Select all
<?
if (!empty($_REQUESTї'Home']))
{$Home = 'ok';} else {$Home = 'nope';};
?>
<form action="test.php" method="get">
<input type="image" name="Home" src="button_home.gif" value="Home">
</form>
<?
echo "home = $Home<br>";
?>mozilla url = http://www.garagelan.com/test/test.php? ... &Home=Home
IE url =
http://www.garagelan.com/test/test.php? ... &Home.y=13
two questions:
why is it passing x.y coordinates in the url?
and why doesn't IE pass the value of the input?
im stumped, any help would be muchly appreciated. i have tried using $_REQUEST $_POST and $_GET along with post and get method forms.. all have the same result.
thx