Re: using custom "button" instead of standard "submit" form element

From: Date: Wed, 29 Jan 2003 09:08:21 +0000
Subject: Re: using custom "button" instead of standard "submit" form element
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-133469@lists.php.net to get a copy of this message
The W3.org site is down at the moment, so I can't confirm this, but I'm pretty sure... <input type="submit" name="parent" value="foo" src="icon.gif" /> ... is correct, but I've never done it :) I think the page you want to look at is: http://www.w3.org/TR/html401/interact/forms.html#edef-INPUT Cheers, Justin on 27/01/03 1:02 PM, Durwood Gafford (durwood@speakeasy.net) wrote: > I can't figure out how to tell which button was pressed by a user when i'm > using a "button" instead of a standard "submit" form element. > > This works: > > <input type="submit" name="parent" value="foo"> > $parent will equal "foo" > > This doesn't work: > > <button type="submit" name="parent" value="foo"><img > src="icon.gif"></button> > $parent will equal "<img src="icon.gif"> NOT "foo" > > How do I get the value of "foo" to be returned in $parent and still use a > graphical icon instead of a standard submit button? > > thanks, > durwood (durwood@berzerker.net) > >

« previous php.general (#133469) next »