hello there
im trying to add 2 links to a login menu
after the user had logged in it should display there name followed by you are logged in.
but if there user level is -1 then it should also add below that the 2 links create fixture and reset rankings.
now ive got all this to show up but only prob is i have hello blah you are logged in twice lol
and also - logout is now only visible to the -1 user level and that needs to be viewable by all
how would i arrange that code below so that it displays the hello you are logged in just the once - along with logout and also the 2 links IF a -1 user level?
<?php
}else{
echo "<p>Hello " . $_SESSION['user'] . ", you are logged in</p>";
if (isset($_SESSION['user']) AND $_SESSION['level'] == '-1'){
echo "Hello " . $_SESSION['user'] . ", you are logged in<br />";
?>
<a href="create_fixtures.php">Create Fixture</a><br />
<a href="ranking.php">Reset Rankings</a>
<?
?>
<br />
<a href="index.php?page=login&logout=yes">Log out</a>
<?php
}
}
?>
im still trying to learn this and i know ive got 2 echo statements the same - ive just never worked with different user levels
thanks in advance :D