hi there
perhaps someone can help me: i am trying to programm a password-secured area and used the following script: if ($SessionUser == "") { header("location:login.php"); unfortionally, i am not directed to login.php but get a notice that i am not allowed to access the page. is there something wrong with the header tag ?
I dont know if the header redirect tag is case sensitive, but it works for me if I use:
header("Location: login.php");
and with the space between the two aswell.
hope it helps.
<?php // should work header('Location: /login.php');
// should work header("Location: login.php");
// or combinations of both ?>
To use the HEADER-funtion more extensivly, check out : http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30 (Perhaps the Referer-entry could be of some (fun) use?)