RE: [PHP] two submit buttons possible?

From: Date: Fri, 05 Jan 2001 16:44:12 +0000
Subject: RE: [PHP] two submit buttons possible?
Groups: php.general 
Request: Send a blank email to php-general+get-32897@lists.php.net to get a copy of this message
> I'm wondering if there is a way in PHP to have two submit > buttons on a form. One directs to one page, the other to another > page. > I have a checkout process that has two options, one for > credit card users that needs to be secure, the other uses a dealer > id which doesn't need to be secure. You can do something like this: <? if(( isset( $submit1 ) || ( isset( $submit2 )) { if( isset( $submit1 ) { // goto secure } elseif( isset( $submit2 )) { // goto unsecure } } ?> <form method="post" action="<? echo $PHP_SELF; ?>"> <input type="submit" name="submit1" value="CC Payments"> <input type="submit" name="submit2" value="Other Payments"> </form> Chris

« previous php.general (#32897) next »