You can use OOP for this sort of thing - define a base class with the
structure you want and 
override the bits you need to in each page.

Class BasePage
{       function BasePage()
        {       // constructor

function Header()

        function MainMenu()

        function SubMenu()

        function MainContent()

        function SubContent()

        function Footer()

        function Output()
        {       $this->Header();
                echo("<tr><td colspan='3'");
        $this-> SubMenu();
        $this-> MainContent ();
        $this-> SubContent ();
                echo("<tr><td colspan='3'");
        $this-> Footer();

you get the idea

Tim Ward <> 

        From:  Wilbert Enserink [SMTP:[EMAIL PROTECTED]]
        Sent:  30 May 2002 08:51
        To:  [EMAIL PROTECTED]
        Subject:  your philosophy on php-design

        Hi all,

        I'm busy building a website. I cannot use frames.
        Every page can be  divided in a table with 3x3 cells.

        The row will be my main menu.
        The first column wil be submenu.
        The middel cell will display the actual content. 

                        |                |
                    <--main menu-->
        ----------------|--------------  |---------------
         sub          |  main       |    sub content
         menu       |  content   |
                        |                |
        ----------------|--------------  |--------------
                        |                |

        the main menu will always be the same, same as the footer -->
        the main content cell depends on which submenu function is choosen.

        Some submenu items are: 

        search in database
        add to your favourite items
        add to basket

        Now I was wondering how to build my site. How should I deal with a
function like 'add to basket'. I mean, when a certain item is displayed and
the customer wants to add it to their basket I have call the script
add_to_basket.php or something like that. However I don't want to leave the
page where the item is displayed, cause that's confusing to the visitor.
Even more..In the 'sub-content' cell I want to display data about ordering
info, like there are so many items in the basket. 

        So I have to call upon a script which stores the info about
add_to_basket, load a total new page where 1 table cell changes, namely the
sub-content cell, but still displayes the original product. 

        So, If I were to use frames It could be done, but now I'm not
thinking of frames but of displaying content dynamically in a tabe cell.

        I would very much appreciate your expert opinion on this matter, I'm
sure every idea helps me form my own ideas which I can use.
        maybe there are people out there who have done this kind of thing,
or know about large sites which use this same concept....

        Any philosophies are much appreciated!

        Wilbert Enserink


        Pas de Deux
        Van Mierisstraat 25
        2526 NM Den Haag
        tel 070 4450855
        fax 070 4450852

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to