Re: multiple submit buttons

From: Date: Wed, 29 Nov 2000 16:59:15 +0000
Subject: Re: multiple submit buttons
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-27835@lists.php.net to get a copy of this message
That works too... but then your code is dependent on the words you want to show in the button... I rather use different names for different buttons and simply check for the existence of the variable. Regards, Sebastian "Daniel Convissor" <danielc@analysisandsolutions.com> wrote in message news:3A24907C.94494E84@analysisandsolutions.com... > Hi Deepak: > > > > From: Deepak Chawla [mailto:dchawla@usa.unl.edu] > > > > > > I need two submit buttons in a html form, and i need them to do two > > > different things...eg: a text box for a filename and two submit buttons, > > > one for opening the file and another for deleting it. > > FORM: > <input type="submit" name="Something" value="Open" /> > <input type="submit" name="Something" value="Delete" /> > > > SCRIPT: > switch ($Something) { > case "Open": > fopen(........); > break; > > case "Delete": > unlink(.......); > break; > > } > > > Enjoy, > > --Dan > > -- > PHP scripts that make your job easier > http://www.analysisandsolutions.com/code/ > SQL Solution | Layout Solution | Form Solution > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 > > > > -- > 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 (#27835) next »