Page 1 of 1

Posted: Fri Apr 25, 2003 5:40 pm
by r337ard
[Admin Edit: Post moved from register_globals sticky thread]

mm, iv read this article over several times. i thaught i understood it but i cant get my code to work (in IE, works fine in moz/phoenix). anyone know what im doing wrong?

Code: Select all

<?php
if (!empty($_REQUEST&#1111;'Home']))
&#123;$Home = 'ok';&#125; else &#123;$Home = 'nope';&#125;;
if (!empty($_REQUEST&#1111;'Forum']))
&#123;$Forum = 'ok';&#125; else &#123;$Forum = 'nope';&#125;;
if (!empty($_REQUEST&#1111;'Contact']))
&#123;$Contact = 'ok';&#125; else &#123;$Contact = 'nope';&#125;;
if (!empty($_REQUEST&#1111;'Gaming']))
&#123;$Gaming = 'ok';&#125; else &#123;$Gaming = 'nope';&#125;;
if (!empty($_REQUEST&#1111;'Gallery']))
&#123;$Gallery = 'ok';&#125; else &#123;$Gallery = 'nope';&#125;;
?>

<form action="test.php" method="get">
<input type="image" name="Home" src="button_home.gif" height="22" valign="bottom" value="Home">
<input type="image" name="Forum" src="button_forums.gif" height="22" value="Forum" />
<input type="image" name="Gallery" src="button_gallery.gif" height="22" value="Gallery" />
<input type="image" name="Gaming" src="button_onlinegaminginfo.gif" height="22" value="Gaming" />
<input type="image" name="Contact" src="button_contact.gif" height="22" value="Contact" />
</form>

<?
echo "home = $Home<br>";
echo "forum = $Forum<br>";
echo "gallery = $Gallery<br>";
echo "gaming = $Gaming<br>";
echo "contact = $Contact<br>";
?>
i broke it all up because there will be other content going around it when i get it working properly. i just dont know why this doens't work in IE at all. IE posts the image coordinates for the input but not the value, and moz posts all the info. dont know why either is happening :(

Posted: Sat Apr 26, 2003 6:08 am
by twigletmac
bumping this 'cause I moved it from the sticky and it ended up half way down the page.

Mac

Posted: Sat Apr 26, 2003 7:23 am
by airo
This doent even sound like it belongs in the PHP forum due to its a client side synax error.

Posted: Sat Apr 26, 2003 7:37 am
by twigletmac
Knew there was something I meant to do with the thread... </brain fart>

Mac

Posted: Sat Apr 26, 2003 10:41 am
by volka
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input_image.asp
Remarks

The x-coordinate is submitted under the name of the control with .x appended, and the y-coordinate is submitted under the name of the control with .y appended. Any value property is ignored. The src property specifies the IMG element.
and the link that they refer to in Standards Information is http://www.w3.org/TR/REC-html32.html
type=image
...
In the submitted data, image fields are included as two name/value pairs. The names are derived by taking the name of the field and appending ".x" for the x value, and ".y" for the y value.

Posted: Sat Apr 26, 2003 10:44 am
by airo
twigletmac wrote:Knew there was something I meant to do with the thread... </brain fart>

Mac
Heh, sok, we all get em.