php-db | 2001062
Date: 06/22/01
- Next message: vipin chandran: "[PHP-DB] .htaccess"
- Previous message: Philippe Saladin: "Re: [PHP-DB] Oracle-PHP"
- In reply to: Jan de Koster: "[PHP-DB] submitbutton/imagebutton"
- Next in thread: Thomas: "RE: [PHP-DB] submitbutton/imagebutton"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
on 6/22/01 6:10 AM, Jan de Koster at jandk <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.
<quote>
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.
</quote>
So basically, instead of checking for $submit, do something like:
... if (isset($submit_x)) { ...
Sincerely,
Paul Burney
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Paul Burney
Webmaster && Open Source Developer
UCLA -> GSE&IS -> ETU
(310) 825-8365
<webmaster <email protected>>
<http://www.gseis.ucla.edu/>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: vipin chandran: "[PHP-DB] .htaccess"
- Previous message: Philippe Saladin: "Re: [PHP-DB] Oracle-PHP"
- In reply to: Jan de Koster: "[PHP-DB] submitbutton/imagebutton"
- Next in thread: Thomas: "RE: [PHP-DB] submitbutton/imagebutton"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

