I am trying this thingy here..
I need to check a users cookie vars to check if the user has acces to this site.
If he does not have access, I send the user to the logon page...
But this script only redirects the user to the logon page whatever I do!!!
But, if I define the "checkaccess" variables in the top of the script, it works!
I am setting the vars in a differnet script. I know they are set, because I can echo them out.....
Is there something here I`ve missed... or am I not making any sense?
<?
if (!checkaccess($cook_ab_nr, $cook_password)) {
header("location:http://www.havneavisen.net/abonnent/logg.php?artikelid=747") ;
exit ;
} else {
?>
<body>
<font face="arial" size="3">
<b><u><i>
<?
echo "NAH NAH NAH NAH" ;
?>
</b></u></i></font>
</body>
<?
} // end check access
?>