What's wrong here? I can't get my access levels working
Code: Select all
<?php
session_start();
include("functions.php");
connect();
if(!isset($_SESSION['uid'])){
echo "You must be logged in to view this page!";
}else{
$query = "SELECT * FROM user WHERE username='$username'";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
if ($row['access'] == 1);
header("Location: logout.php");
if ($row['access'] == 5)
header("Location: index.php");
}
?>