on 6/22/01 6:10 AM, Jan de Koster at [EMAIL PROTECTED] wrote:

> I'm kind of new to php so there may be an obvious answer but I can't
> find it for the moment.

Look at the PHP FAQ, it's a great place to start:


> In pure HTML there is of course no problem, the image is still used as a
> submit button but... the submit type is being passed on to a php script
> ( ...if ($submit) {...) that makes a qeary to a mysql database. When I
> change the type=submit to type=image the script doesn't pick up the
> submit value anymore, so nothing happens.


7.13. I'm trying to use an <input type="image"> tag, but the $foo.x and
$foo.y variables aren't available. Where are they?
When submitting a form, it is possible to use an image instead of the
standard submit button with a tag like:

<input type="image" SRC="image.gif" NAME="foo">
When the user clicks somewhere on the image, the accompanying form will be
transmitted to the server with two additional variables: foo.x and foo.y.

Because $foo.x and $foo.y are invalid variable names in PHP, they are
automagically converted to $foo_x and $foo_y. That is, the periods are
replaced with underscores.


So basically, instead of checking for $submit, do something like:

... if (isset($submit_x)) { ...


Paul Burney

Paul Burney
Webmaster && Open Source Developer
(310) 825-8365

PHP Database 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