Hi,
I got this function on index.php:
//user 'logado' ou nao
function is_logged()
{
if(isset($_SESSION['username'])) {
return true;
}else{
return false;
}
}
And i want to use it on top.php (on top is the banner and the menu).
<div>
<ul class="menu">
<li class="top"><a href="index.php" class="top_link"><span>Página Principal</span></a></li>
<li class="top"><a href="inscricao.php" class="top_link"><span>Inscrições Online</span></a></li>
<li class="top"><a href="cursos.php" class="top_link"><span>Cursos</span></a></li>
<li class="top"><a href="contact.php" class="top_link"><span>Contacte-nos</span></a></li>
<?PHP
if(is_logged())
{
?>
<li class="top"><a href="index.php" class="top_link"><span>
<?PHP $_SESSION['username'] ?>
</span></a></li>
<?PHP
;}
?>
</ul>
</div>
What's wrong here?