RE: [PHP] Multi-Step Script
| From: | Jason Murray | Date: | Wed, 14 Mar 2001 06:59:23 +0000 |
| Subject: | RE: [PHP] Multi-Step Script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-43780@lists.php.net to get a copy of this message | ||
> if( $submit ){
> print "I love Montana";
> >>>put form #2 in here w/ action = $PHP_SELF make sure you
> set $submit2 to
> some value
> )
> elseif( $submit2 ){
> print "Part two of script";
> }
> else{
> >>>put your form in here w/ action= $PHP_SELF
> }
Actually - do it in the reverse order, because then you can do error
checking and gracefully "drop back" to a previous step if there's an
error.
ie:
if ($step == 3)
{
// do stuff
}
if ($step == 2)
{
// do stuff
}
if (!$step)
{
// do stuff
}
Jason