Alright, so meanwhile i wait for answer on the other thread i started another project, to fix the menu... but it was a bit confusing so now i ask you again!...
Heres my current menu.php
<?php
include "config.php";
if (!$_SESSION["valid_user"])
{
echo '<a href="login.php">' . 'Login <br/><br/>' . '</a>';
}
if ($_SESSION["valid_user"])
{
echo '<a href="logout.php">' . 'Logout <br/><br/>' . '</a>';
echo '<a href="members.php">' . 'Control Panel <br/><br/>' . '</a>';
}
echo '<a href="memberlist.php">' . 'Members <br/><br/>' . '</a>';
echo '<a href="ranking.php">' . 'Rankings <br/><br/>' . '</a>';
?>
Now it works perfectly when logged in, but when you logout the session dies, leaving me with this:
Notice: Undefined index: valid_user in C:\wamp\www\kawaii\menu.php on line 5
Login
Notice: Undefined index: valid_user in C:\wamp\www\kawaii\menu.php on line 10
Members
Rankings
Now, how can i make a login that depends on if your logged in if this happens when you logout..., i hope someone can find a solution that can work out