Hai
I an new to PHP and need some help.
what i am trying to do is
A php page such that it shuld have the some links on the top
world | windows | linux | DOS|
and every time we click on any of these links the corresponding pages should be displayed......
tat is the a page snippet corresponding the windows url shuld be displayed if i click dos ..........
I am calling my tech.php(which contains the above link) into the index.php
and my tech.php has the following code
tech.php
------------------
<!-- Begin Left Menu -->
<?php require("http://host/menus/top.php"); ?>
<!-- End Left Menu -->
<!-- Begin PhP content -->
<div id="tech">
<?php
switch($HTTP_GET_VARS['page'])
{ /* Script courtesy of EvilWalrus.com */
case '0':
include ' http://host/content/home.php ';
break;
case '1':/* Alias for the actual page for security purposes */
include ' http://host/content/win.php ';
break;
case '2':
include ' http://host/content/linux.php ';
break;
case '3':
include ' http://host/content/dos.php ';
break;
default:
include ' http://host/content/home.php ';
break;
}
?>
- <!-- Begin Left Menu -->
- <?php require("http://host/menus/top.php"); ?>
- <!-- End Left Menu -->
- <!-- Begin PhP content -->
- <div id="tech">
- <?php
- switch($HTTP_GET_VARS['page'])
- { /* Script courtesy of EvilWalrus.com */
- case '0':
- include ' http://host/content/home.php ';
- break;
- case '1':/* Alias for the actual page for security purposes */
- include ' http://host/content/win.php ';
- break;
- case '2':
- include ' http://host/content/linux.php ';
- break;
- case '3':
- include ' http://host/content/dos.php ';
- break;
- default:
- include ' http://host/content/home.php ';
- break;
- }
- ?>
the top.php
---------------
<table width=850 cellpadding="3">
<tr align=center>
<td align="center" width=132><a href="http://host/content/tech.php?page=0">Tech Home</a></td>
<td align="center" width=5> | </td>
<td align="center" width=132><a href="http://host/content/tech.php?page=1">Windows</a></td>
<td align="center" width=5> | </td>
<td align="center" width=132><a href="http://host/content/tech.php?page=2" >Linux</a></td>
<td align="center" width=5> | </td>
<td align="center" width=132><a href="http://host/content/tech.php?page=3"> DOS</a></td>
<td align="center" width=5> | </td>
<td align="center" width=302><a href="http://host/content/tech.php?page=4" > Free Downloadable Programs</a></td>
</tr>
</table>
- <table width=850 cellpadding="3">
- <tr align=center>
- <td align="center" width=132><a href="http://host/content/tech.php?page=0">Tech Home</a></td>
- <td align="center" width=5> | </td>
- <td align="center" width=132><a href="http://host/content/tech.php?page=1">Windows</a></td>
- <td align="center" width=5> | </td>
- <td align="center" width=132><a href="http://host/content/tech.php?page=2" >Linux</a></td>
- <td align="center" width=5> | </td>
- <td align="center" width=132><a href="http://host/content/tech.php?page=3"> DOS</a></td>
- <td align="center" width=5> | </td>
- <td align="center" width=302><a href="http://host/content/tech.php?page=4" > Free Downloadable Programs</a></td>
- </tr>
- </table>
now the problem is
it is not displaying home.php contents even when i have given the full path .
and when i click on the links then it take me to the new page with only the top.php and the page which is clicked .
I want that it shuld remain in the index.php and only the tech.php shuld change according to the contents .........
any suggestions will be reallly great!!!!!!
thanks
urs
sai