RE: [PHP] FORM <input type=image ...> with a posting value

From: Date: Fri, 06 Apr 2001 19:32:39 +0000
Subject: RE: [PHP] FORM <input type=image ...> with a posting value
Groups: php.general 
Request: Send a blank email to php-general+get-47497@lists.php.net to get a copy of this message
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. > > So, > > <input type=submit name="modeEdit" value="Edit Contacts"> > <input type=submit name="modeAdd" value="Add Products"> > > if($modeEdit_x) > blah > elseif ($modeAdd_x) > blah > > Kirk > > > -----Original Message----- > > From: Jared Howard [mailto:webbie@deanox.com] > > Sent: Friday, April 06, 2001 1:07 PM > > To: php-general@lists.php.net > > Subject: [PHP] FORM <input type=image ...> with a posting value > > > > > > I have a page with multiple form submit buttons that carry > > different values > > to do different functions and such. > > > > <form name="bidfile" method=post action="<?=$ME?>"> > > <input type=submit name="mode" value="Edit Contacts"> > > <input type=submit name="mode" value="Add Products"> > > <input type=text name="something" value="<?=$something?>"> > > ... > > </form> > > > Which works great!! However, I grow tiresome of the typical > > button "look", > > and in my attempt to use an image instead: > > > > <input type=image name="mode" value="Edit Contacts" > > src="contacts.png"> > > > > failed. Is there a way to do this? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.general (#47497) next »