RE: [PHP] Re: form submission logic

From: Date: Mon, 10 May 2004 12:39:29 +0000
Subject: RE: [PHP] Re: form submission logic
Groups: php.general 
Request: Send a blank email to php-general+get-185790@lists.php.net to get a copy of this message
[snip] This is more of a HTML than a PHP question, but anyway: It doesn't matter where you put the buttons as long as they are INSIDE the form-tag and have different names. [/snip] Actually you can name them all the same thing and then have PHP process the form via a switch/case statment. <input type="submit" name="action" value"Publish"> <input type="submit" name="action" value"Un-Publish"> <?php switch($_POST['action']){ case "Publish": ... do stuff ... break; case "Un-Publish": ... do stuff ... break; }

« previous php.general (#185790) next »