simple problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Piotr Wolski

    simple problem

    i have two files that consists of menu items:

    menu_left.php , menu_right.php

    my index.php file:

    include("menu_l eft.php");
    include("menu_r ight.php");

    i want to do:

    when i click on the item from menu_left(or right) so the text displays
    on the screen in the center. now it is displaying under menu.
  • kingofkolt

    #2
    Re: simple problem

    "Piotr Wolski" <wolski@cs.purd ue.edu> wrote in message
    news:cdm6ia$ooi $1@mozo.cc.purd ue.edu...[color=blue]
    > i have two files that consists of menu items:
    >
    > menu_left.php , menu_right.php
    >
    > my index.php file:
    >
    > include("menu_l eft.php");
    > include("menu_r ight.php");
    >
    > i want to do:
    >
    > when i click on the item from menu_left(or right) so the text displays
    > on the screen in the center. now it is displaying under menu.[/color]

    contents of menu_left.php:

    <a href="index.php ?page=somepage" >Some page</a>

    contents of menu_right.php:

    <a href="index.php ?page=someother page">Some other page</a>

    contents of index.php:

    <table width="100%" border="0" cellpadding="0" cellspacing="0" >
    <tr valign="top">
    <td><?php include("menu_l eft.php"); ?></td>
    <td><?php
    switch ($_GET['page']) {
    case "somepage":
    include("somepa ge.php");
    break;
    case "someotherpage" :
    include("someot herpage.php");
    break;
    // more cases here...
    case "default":
    include("home.p hp");
    break;
    }
    </td>
    <td><?php include("menu_r ight.php"); ?></td>
    </tr>
    </table>


    Comment

    Working...