I know this topic has been discussed a few times here and also on
php.net, but I cannot find an answer to my specific problem. I check to
see if a user is logged in before serving admin.php like so:
<?php
session_start();
if (!isset($_SERVER['username']) or !isset($_SERVER['password'])) {
header("location:http://linux-place.com");
exit;
}
?>
These are the very first lines in the file. It works perfectly. The
problem is that I would like to output a message like "Please login
first before accessing the administration panel". How can I do that
without getting the headers already sent error?
Thanks,
Ahmed El-Daly