RE: [PHP] Submit Image Button
| From: | John Coggeshall | Date: | Thu, 03 Apr 2003 02:36:42 +0000 |
| Subject: | RE: [PHP] Submit Image Button | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142057@lists.php.net to get a copy of this message | ||
http://www.php.net/manual/en/language.variables.external.php
<input type="image" src="image.gif" name="sub">
This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing the
X/Y cordinate where the button was clicked (assuming it was GET method
form submission)
John
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
>-----Original Message-----
>From: Thomas [mailto:zaxisnet@hotmail.com]
>Sent: Wednesday, April 02, 2003 9:27 PM
>To: php-general@lists.php.net
>Subject: [PHP] Submit Image Button
>
>
>I have a problem with my php.
>
>I have a form and in that form there is an image submit
>button. When I click on it, it won't tell me if the submit
>button is clicked. It works fine with a normal one.
>
>sample:
>
><?
> if (!$submit) {
>?>
>
> <form name="" method="post" action="<?php echo $PHP_SELF
> ?>
> <input type="text" name="username" size="20"
> Class="Box">
> <input type="password" name="passwd" size="20"
> Class="Box>
> <input type="checkbox" name="remember" value="1">
> <input type="image"
>src="../News/themes/xFClan/button_submit.gif"
>border="0" name="submit" value="Login" width="55"
>height="19"
>alt="Submit">
> </form>
>
><?
> } else {
> echo "you clicked";
> }
>?>
>
>If I use <input type="submit" ... > This works fine....do I
>need to do something else with the code? Help is very appreciated.
>
>Cheers.
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>