sorry for askin here noob questions but i really need help
im starting php and first try is to make a menu index.php with submenus in style like:
index.php?page=1 -> and then link that to page 1...
but that doesnt seem to work, what did i do wrong?
im starting php and first try is to make a menu index.php with submenus in style like:
index.php?page=1 -> and then link that to page 1...
<div id="menu">
<ul>
<li><a href="index.php?page=home">Home</a></li>
<li><a href="index.php?page=1">Test 1</a></li>
<li><a href="index.php?page=2">Test 2</a></li>
</ul>
<?php
if(isset($_GET['page']) && $_GET['page'] == 'home')
{
include 'index.php';
}
if(isset($_GET['page']) && $_GET['page'] == '1')
{
include 'test1.php';
}
if(isset($_GET['page']) && $_GET['page'] == '2')
{
include 'test2.php';
}
?>
</div>
but that doesnt seem to work, what did i do wrong?