RE: [PHP-DB] submitbutton/imagebutton
I'm kind of new to php so there may be an obvious answer but I can't find it for the moment. What I want to do is change the 'type=submit' of a submit button to 'type=image' so I can control the looks of the button. 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. Am I overlooking something or is it just something that doesn't work? IIRC you have to use something like $submit_x $submit_y, which is a bit more longwinded. Since I have started using buttons for submit, I now put a hidden field called formname inside each form,and chekc for that and that the method of the form is correct. It makes it a little bit easier if you have more than one form per page. HTH M@ -- 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]
Re: [PHP-DB] submitbutton/imagebutton
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: http://php.net/FAQ.php 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 - GSEIS - ETU (310) 825-8365 [EMAIL PROTECTED] http://www.gseis.ucla.edu/ ++ -- 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]
RE: [PHP-DB] submitbutton/imagebutton
No, with an image, the value captured are the coordinates x and y above the image this means that if your variable is called submit, the two variables $submit_x and $submit_y are set. - Mensaje original - De: Jan de Koster [EMAIL PROTECTED] Para: [EMAIL PROTECTED] Enviado: vendredi 22 juin 2001 10:10 Asunto: [PHP-DB] submitbutton/imagebutton Hi, I'm kind of new to php so there may be an obvious answer but I can't find it for the moment. What I want to do is change the 'type=submit' of a submit button to 'type=image' so I can control the looks of the button. 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. Am I overlooking something or is it just something that doesn't work? jan -- 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] -- 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]