I need help fixing this, I am pretty new to php. So far what I have is a user table with; userid, username, password, email, and user_level(for setting user/admin). I want to make it so certain things show for everyone logged in or not, then different things for users/admins. I also want to echo the username where the login button normally is on the home page.
Here is what I have–
[code=html]<!DOCTYPE html>
<html>
<?php include “base.php”; ?>
<head>
<title> Scenery Sample Site | Home</title>
<link href=’http://fonts.googleapis.com/css?family=Lobster’ rel=’stylesheet’ type=’text/css’>
<link href=”css/bootstrap.css” rel=”stylesheet”>
<link href=”css/main.css” rel=”stylesheet”>
</head>
<div class=”nav”>
<div class=”container”>
<ul class=”pull-left”>
<li><a href=”index.html”>Home</a></li>
<li><a href=”#”>About Us</a></li>
<li><a href=”#”>Pricing</a></li>
<li><a href=”#”>Feedback</a></li>
</ul>
<ul class=”pull-right”>
[code=php]
<?php
if($_SESSION[‘user_level’] == 1) {
echo “Hello $username”;
}
?>
</ul>
</div>
</div>
<div class=”jumbotron”>
<div class=”container”>
<h1>Scenery for your favourite<br> destinations!</h1>
<p>Learn more about our products by clicking the link below.</p>
<p><a href=”products.html”>Visit our product page.</a></p>
</div>
</div>
<div class=”we-offer”>
<div class=”container”>
<div class=”col-md-4″>
<h3>Custom Building Models!</h3>
<p>All of our scenery models are custom made by our developers.</p>
<p><a>More Details Here!</a></p>
</div>
<div class= “col-md-4”>
<h3>State of The Art Texturing!</h3>
<p>All of our scenery textures are custom, and of the highest quality. You will have to make sure you’re not watching real life.</p>
<p><a>More Details Here!</a></p>
</div>
<div class=”col-md-4″>
<h3>Moving Jet-ways!</h3>
<p>A lot of competitors remove the functionality of moving jetways that fsx comes with. Well guess what, we don’t!</p>
<p><a>More Details Here!</a></p>
</div>
</div>
<div class=”container”>
<div class=”col-md-4″>
<div class= “thumbnail”>
<img src=”
</div>
</div>
<div class= “col-md-4”>
<div class= “thumbnail”>
<img src=”
</div>
</div>
<div class=”col-md-4″>
<div class= “thumbnail”>
<img src=”
</div>
</div>
</div>
</div>
</html>[/code]