Hey,
Im trying to make a redirection file,so that unauthorized users cannot see an administration section.
Im not quite sure how to go about it though.
Code:
<?php
session_start();
include('conn.php');
"SELECT rank FROM table_users WHERE level =<1";
{ echo "here is the admin section"; }
else {
$redirect = $_SERVER['PHP_SELF'];
header("refresh:5; URL=../../index.php?redirect=$redirect");
?>
You can see where the code is incorrect, and hopefully get an idea of what i am trying to do, your help would be appreciated.