>"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >[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; > >}
Correct, but it might quickly break your code if you decide to give the button a different label (value attribute). This could be solved, though, by working with constants that are defined in a seperate language resource file. Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php