RE: [PHP] Many forms in one php file
| From: | Jay Blanchard | Date: | Tue, 15 Feb 2005 19:27:01 +0000 |
| Subject: | RE: [PHP] Many forms in one php file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-208762@lists.php.net to get a copy of this message | ||
[snip]
I want to create a single php file which will be able to display
multiple html
forms.
Like this: Form1 -> Form2 -> Form3.
After the user completes and submits Form1, the script will process it
and
display a different form. etc...
I am new to php, I would need some detailed instructions, or point me to
an
opensource php script which already does that so that I can analyse it.
[/snip]
Google is your friend for tutorials and there are several examples of
what you want to do web wide. Basically your form action(s) will be
$PHP_SELF and you should use the POST method. Each form could be a case
in a switch statement http://www.php.net/switch with each
form button
having an action. There are several good examples there