I *think* you can get the values with $HTTP_GET_VARS['image1.x'] (and the
same for image1.y).  If your method is set to POST, use the $HTTP_POST_VARS
array instead.

Obviously to tell which one the user clicked you can use

if (isset($HTTP_GET_VARS['image1.x])) {
  ... code here ...

If the value has been set, that image was clicked.  The x and y values
correspond to the precise pixel that was clicked which allows these to be
used as pseudo-imagemaps which you can code for.

Mike Frazer

"Ergin Aytac" <[EMAIL PROTECTED]> wrote in message
> I have a form-page with several image-submit buttons. how can I know which
> image is clicked? It's not allowed to use java-script or any client-side
> "make the life easy"-scripts.
> <form name="form1" method="get" action="test.php">
> <input type="image" border="0" name="image1" src="goa.gif">
> <input type="image" border="0" name="image2" src="gob.gif">
> </form>
> I get two vars per image with the clicked point values on the image like
> image1.x, image1.y and so on. How can I get the values of these variables?
> tried $image1.x, ${"image1.x"}, $image1["x"], but they didnt work. I could
> not find out the correct syntax.
> if I get the value of these vars or use the isset function, I can get out
> which image is clicked because the "non-clicked" image has no values for
> clicked-point on itself.
> the vars are available in $QUERY_STRING so I could parse it, but I think
> there is a simple way to get these vars.
> thanx (also for any links to manuals).
> Ergin Aytac

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to