RE: [PHP] Re: 1 Form, 2 Submit-Buttons
| From: | John Holmes | Date: | Fri, 12 Jul 2002 10:30:03 +0000 |
| Subject: | RE: [PHP] Re: 1 Form, 2 Submit-Buttons | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107340@lists.php.net to get a copy of this message | ||
> give a name to the buttons ie: Next
> <input name="Next" type="image" id="Next"
> src="whatever">
>
> and check in php
> <?
> if(isset($Next.x) && isset($Next.y)){
> // do somehting here
> }
> ?>
Actually, when an image is clicked on to submit the form, two variables
are created. If the image is named 'Next' like the example above, then
you'll have $Next_x and $Next_y (or the equiv. in the _GET or _POST
array). The variables will hold the x/y value of where the image was
clicked. You can just check to see if one of those variables is set.
---John Holmes...