470,874 Members | 1,486 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,874 developers. It's quick & easy.

simple problem

i have two files that consists of menu items:

menu_left.php , menu_right.php

my index.php file:

include("menu_left.php");
include("menu_right.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.
Jul 17 '05 #1
1 1312
"Piotr Wolski" <wo****@cs.purdue.edu> wrote in message
news:cd**********@mozo.cc.purdue.edu...
i have two files that consists of menu items:

menu_left.php , menu_right.php

my index.php file:

include("menu_left.php");
include("menu_right.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.


contents of menu_left.php:

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

contents of menu_right.php:

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

contents of index.php:

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td><?php include("menu_left.php"); ?></td>
<td><?php
switch ($_GET['page']) {
case "somepage":
include("somepage.php");
break;
case "someotherpage":
include("someotherpage.php");
break;
// more cases here...
case "default":
include("home.php");
break;
}
</td>
<td><?php include("menu_right.php"); ?></td>
</tr>
</table>
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Patchwork | last post: by
reply views Thread by 42 | last post: by
18 posts views Thread by Sender | last post: by
27 posts views Thread by one man army | last post: by
2 posts views Thread by Vitali Gontsharuk | last post: by
8 posts views Thread by rdrink | last post: by
5 posts views Thread by Chelong | last post: by
30 posts views Thread by galiorenye | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.