markross
07-28-2006, 04:30 PM
I need to write a script that will access VB variables, so I am starting out with some basic practice scripts to get the hang of it. However I am encountering a problem at the first stage. I have made a simple script as follows:
<?php
require_once('./global.php');
if ($show['guest'])
echo "you're not logged in";
else
echo "you are logged in";
?>
This script works fine if I'm logged in. However if I'm not logged in I get the following error:
"Unable to add cookies, header already sent.
File: /var/www/vhosts/urban-gorilla.co.uk/httpdocs/community/test.php
Line: 10"
Can anyone suggest why this might be happening?
Thanks
Mark
<?php
require_once('./global.php');
if ($show['guest'])
echo "you're not logged in";
else
echo "you are logged in";
?>
This script works fine if I'm logged in. However if I'm not logged in I get the following error:
"Unable to add cookies, header already sent.
File: /var/www/vhosts/urban-gorilla.co.uk/httpdocs/community/test.php
Line: 10"
Can anyone suggest why this might be happening?
Thanks
Mark