use if statements
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
}
This is a quicky but hopefully you get the idea. Just assign values to
different variables. Post the info back to $PHP_SELF and test for the
existence of those variables in your if statements. Your single php script
could span an unlimited number of pages (as far as the end user is
concerned).
Kevin Leavell
[EMAIL PROTECTED]
P 406.829.8989
C 406.240.4595
---> -----Original Message-----
---> From: Andrew V. Romero [mailto:[EMAIL PROTECTED]]
---> Sent: Tuesday, March 13, 2001 9:59 PM
---> To: [EMAIL PROTECTED]
---> Subject: [PHP] Multi-Step Script
--->
--->
---> 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: [EMAIL PROTECTED]
---> For additional commands, e-mail: [EMAIL PROTECTED]
---> To contact the list administrators, e-mail:
---> [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]