Not sure I fully understand (sorry I'm new to PHP so may be a little slow off the mark)...
Do you mean something like this?
- <?php
-
session_start();
-
$_SESSION['username'] = $username;
-
-
if (!$username==admin)
-
{
-
header("location:client.htm");
-
}
-
?>
It may bad code, but it restrics access to the page, but also to the user "admin" which is supposed to be the only one WITH access :(
Essentially what I'm trying to do is:
1) load page
2) check logged in user
3) if "admin" allow access to page
4) if not "admin" redirect back to client.htm
Regarding the other point, I'll look into htaccess.
Cheers dude!