Re: multiple submit buttons

From: Date: Wed, 29 Nov 2000 05:13:32 +0000
Subject: Re: multiple submit buttons
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-27774@lists.php.net to get a copy of this message
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

« previous php.general (#27774) next »