I'm having problems w/ my logout routine for my website. Here it is:
--------------------------------------------------------------------
<?php
session_start();
if(isset($userid))
{
session_unregister('userid');
session_unregister('passwd');
echo "You are now logged out";
}
else
{
echo "You are not logged in...";
}
session_destroy();
--------------------------------------------------------------------
I get the following message when "session_start()" is called:
--------------------------------------------------------------------
Warning: Cannot send session cache limiter - headers already sent (output started at /home/sites/site194/web/logout.php:5) in /home/sites/site194/web/logout.php on line 7
--------------------------------------------------------------------
The user IS actaully logged out, i just don't like that error message. I know i can just put a "@" in front of the call to session_start and it won't show up, but i'd rather know why this message is there. Am I doing something wrong?
--------------------------------------------------------------------
<?php
session_start();
if(isset($userid))
{
session_unregister('userid');
session_unregister('passwd');
echo "You are now logged out";
}
else
{
echo "You are not logged in...";
}
session_destroy();
--------------------------------------------------------------------
I get the following message when "session_start()" is called:
--------------------------------------------------------------------
Warning: Cannot send session cache limiter - headers already sent (output started at /home/sites/site194/web/logout.php:5) in /home/sites/site194/web/logout.php on line 7
--------------------------------------------------------------------
The user IS actaully logged out, i just don't like that error message. I know i can just put a "@" in front of the call to session_start and it won't show up, but i'd rather know why this message is there. Am I doing something wrong?