Re: Multi-Step Script

From: Date: Wed, 14 Mar 2001 05:28:05 +0000
Subject: Re: Multi-Step Script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43771@lists.php.net to get a copy of this message
Use switch with includes for each step. switch() {
    case 1:
        include(filestep1.php)
        break;
    case 2:
        include(filestep2.php)
        break;
    default:
        include(form.php)
} but this way you can have a hierarchy.... and possibly run form one section into the next.. switch($step) {
    case 1:
        include(filestep1.php) //list products
    case 2:
        include(filestep2.php) //list categories
        break;
    default:
        include(form.php)  //show list of options.
} At 09:59 PM 3/13/01 -0700, you wrote:
Is it possible to use different parts of one php script for multiple html forms? I am not seeing how people create multiple pages of html forms with each form importing information from the previous form. Right now, for each html form page I have, I create one php script to handle it but it would be nice to have just one php script in which only certain parts execute depending on have variables have assignments. One way I was thinking of doing this is to have the html forms just keep posting the information to itself whenever the submit button is hit and then using a series of if else statements to evaluate where the program is in relationship to the forms, would this type of system work? What do you guys do? -Andrew V. Romero
    To reply personally, remove all numbers from address.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
########################################################## # Rick St Jean, # rstjean@internet.look.ca # President of Design Shark, # http://www.designshark.com/ # Quick Contact: http://www.designshark.com/messaging.ihtml # Tel: 905-684-2952 ##########################################################

« previous php.general (#43771) next »