RE: [PHP] how to get different submit button values, when images?

From: Date: Wed, 10 Oct 2001 16:57:59 +0000
Subject: RE: [PHP] how to get different submit button values, when images?
Groups: php.general 
Request: Send a blank email to php-general+get-70698@lists.php.net to get a copy of this message
Great question, in faqt, it is frequently asked! ;) http://www.php.net/manual/en/faq.using.php#AEN63164 Kirk > -----Original Message----- > From: Leone, Brian [mailto:brian.leone@lmco.com] > Sent: Wednesday, October 10, 2001 9:33 AM > To: 'php-general@lists.php.net' > Subject: [PHP] how to get different submit button values, when images? > > > I have a script that needs several different submit "buttons" > in a single > form, and I need to have the script figure out which button > they pushed. > However, I am trying to make all of the buttons images, but am having > trouble getting an image button carry a value with it... any ideas? > > this is what I have: the three submit buttons carry the > correct value (ie, > value5) with them to the $submit variable, but the three image buttons > don't. > > -------------------------------------------------------------- > -------------- > ------------------------------------------------------------- > <form method="post" action="test.phtml"> > <input type="image" src="blackdot2.jpg" width=20 height=20 > value="value1" > name="submit"> > <input type="image" src="blackdot2.jpg" width=20 height=20 > value="value2" > name="submit"> > <input type="image" src="blackdot2.jpg" width=20 height=20 > value="value3" > name="submit"> > <input type="submit" value="value4" name="submit"> > <input type="submit" value="value5" name="submit"> > <input type="submit" value="value6" name="submit"> > </form> > <? > echo $submit; > ?> > -------------------------------------------------------------- > -------------- > ------------------------------------------------------------- > > Thanks. > brian > > > > -- > 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 (#70698) next »