"Johnson, Kirk" wrote:
> 
> Oops. You do need the type=image and src= attributes, instead of what I
> wrote in the example. Good thing it's Friday :)
> 
> > -----Original Message-----
> > From: Johnson, Kirk
> > Sent: Friday, April 06, 2001 1:29 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP] FORM <input type=image ...> with a posting value
> >
> >
> > Yes, but you no longer check the value of "value" to
> > determine which button
> > was clicked. Instead, give each button a unique *name*
> > attribute, then check
> > if $name_x is set. The browser returns the x,y coordinates of
> > the point
> > where the user clicks the button, in variables named name_x
> > and name_y.

        To create unique name for many <input type=image ...> elements you can
use array

        <FORM method=post ...>
        <input type=image name=images[1] ...>
        <input type=image name=images[2] ...>
        <input type=image name=images[3] ...>
        </FORM>

        and so on.  When you submit this form the $images array will be set and
sizeof($images) == 1.

-- 
        CU, Victor Gamov

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