[SOLVED] Many HTMLs = 1 PHP ???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ebren
Forum Newbie
Posts: 2
Joined: Mon Oct 25, 2004 4:39 pm

Many HTMLs = 1 PHP ???

Post by ebren »

I am currently working on the design of my own web portal. I have finished a lot of the layout and design, and I am now working on the installation script. It is functional, but since during the installation I have the user answer many questions concerning the bulletin board, I have many different files which carry the information in hidden fields until the last page (i.e. first page is install.php, which its form information is saved as hidden field in install2.php, whose form information is saved as hidden fields in install3.php....until it is all processed by installprocess.php). I wanted to know if there was a way of combining all of these into one PHP file, like after a submit button is clicked, the page is wiped clean and served new data, but it is the same PHP file. Is that possible?
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Put the page content into a [php_man]switch[/php_man]() conditional, and then base the switch() on a $_GET variable.
ebren
Forum Newbie
Posts: 2
Joined: Mon Oct 25, 2004 4:39 pm

Post by ebren »

Thanks, workin gfine now!
Post Reply