Re: Image Button coordinates ???
| From: | Matt McClanahan | Date: | Mon, 06 Nov 2000 18:53:52 +0000 |
| Subject: | Re: Image Button coordinates ??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-23949@lists.php.net to get a copy of this message | ||
On Mon, 6 Nov 2000, Anderson wrote:
> Hi,
>
> Does anybody know how can I get the x,y coordinates from an Image
> Button? I tried to do like this:
> nameOfButton->x , or nameOfButton[x] , but I didn't get it...
It's always amusing how questions like this come in waves. Like,
sometimes five or six people will ask how to pass an array with a
form within 2 days of each other.
In this case, ths question was answered only a few hours ago. :)
The HTML spec says that cgi langauges should be aware of two variables
when somebody clicks on an image submit button: <name>.x and <name>.y.
Since period isn't a legal variable name character, PHP uses underscores.
So, an image submit button
<input type="image" name="foof">
will yield
$foof_x and $foof_y
Matt