Hiya.
I have just decided to include the code in the "Page_Header.PHP" of the forum... As opposed to the individual pages (makes more sense, I think?)
Anyway... There are now only three errors. At the top of the script, I have:
<?
session_start();
if(!session_is_registered(username)){
header("location:index.php");
}
?>
The errors are:
Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/forum/includes/page_header.php:7) in /home/public_html/forum/includes/page_header.php on line 489
Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/forum/includes/page_header.php:7) in /home/public_html/forum/includes/page_header.php on line 491
Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/forum/includes/page_header.php:7) in /home/public_html/forum/includes/page_header.php on line 492
Those lines are (the ones below maked 'header'):
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))
{
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
else
{
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');
header ('Pragma: no-cache');
Therefore - my question is... Can I change the initial code:
<?
session_start();
if(!session_is_registered(username)){
header("location:index.php");
}
?>
For something other than header? Like Include or something / somehow?
Thanks for your help with this.
MM2006 🙂