Re: FORM <input type=image ...> with a posting value

From: Date: Sun, 08 Apr 2001 19:23:46 +0000
Subject: Re: FORM <input type=image ...> with a posting value
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47656@lists.php.net to get a copy of this message
"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: php-general@lists.php.net > > 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

« previous php.general (#47656) next »