i want the menu to be shown when the user is logged in, but it shows me this menu when the user is logged out and logged in:
upload a video or image
albums
profile
index.php file:
[php]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<?php
session_start();
?>
<head>
<title>Visual Upload</title>
<link rel="stylesheet" href="css/layout.css" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="logo">
<img src="images/logo.png">
</div><!-- logo -->
<div id="logo_right">
<?php
if (isset($_SESSION['user']))
{
echo "<font size='2' face='arial'>Welcome, ".$_SESSION['user']."! / <a href='logout.php' title='Logout'>Logout</a>";
}
else
{
?>
<table class="tlogin">
<form action="login.php" method="POST">
<tr>
<td>
Username:
</td>
<td>
<input type="text" name="user" size="16" maxlength="25" /> <a href="register.php" title="Register a new account">Register</a>
</td>
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type="password" name="password" size="16" maxlength="25" /> <input type="submit" name="submit" value="Log in" />
</td>
</tr>
</form>
</table>
<?php
}
?>
</div><!-- logo_right -->
<div id="nav">
<ul>
<li><a href="#" title="Upload a video or image">Upload</a></li>
<li><a href="#" title="View your albums">Albums</a></li>
<li><a href="#" title="View your profile">Profile</a></li>
</ul>
</div><!-- nav -->
<div id="content">
<p>Some content here</p>
<p>Maybe some more here</p>
</div><!-- content -->
<div id="footer">
Made By <a href="http://phpacademy.info/forum/memberlist.php?mode=viewprofile&u=893" title="Fuzzi0n">Fuzzi0n</a> <!-- DO NOT REMOVE THIS OR YOU BREAK THE COPYRIGHT, AND LEAVE THE SIZE AT 9PT -->
</div><!-- footer -->
</div><!-- wrapper -->
</body>
</html>
[/php]
