I have a basic user authentication script
<?
if($action=="admin") {
if($adminpassword == "MY PASSWORD") {
setcookie ("adminloggedin", "yes", "+3600");
header("Location: index.php");
}else { echo "Wrong password";}}
if($action == "logout") {
setcookie ("adminloggedin", " ", "-3600");
header("Location: index.php");
}else{}
?>
thanks to a friend of mine.
If I had several pages for my news script wether they be templates or acutally my news script.
I was wondering would I use a code like this
to check on evey page or script to make sure the user was loged in??
<? if($cookie == "value") {?> -
something else goes here but what??
you content here
[code=php]<? } else { Echo "You do not have access to this page";
} ?>
thanks I appreciate your help
cya
Sam Colebatch
sam@samcolebatch.com
http://www.samcolebatch.com