proud Posted February 8, 2007 Share Posted February 8, 2007 I dont know what is wrong with this piece of code, although i get the message (Welcome, you are still logged in) which means that the code has worked besides it i get this error message: Warning:Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\checkLogin.php:2) in C:\AppServ\www\checkLogin.php on line 5 Welcome, you are still logged in. this is my code for the page checklogin.php: <?php //start the session session_start(); //check to make sure the session variable is registered if(session_is_registered('username')){ //the session variable is registered, the user is allowed to see anything that follows echo 'Welcome, you are still logged in.'; } else{ //the session variable isn't registered, send them back to the login page header( "Location: login.htm" ); } ?> Link to comment https://forums.phpfreaks.com/topic/37628-cannot-send-session-cache-limiter/ Share on other sites More sharing options...
Jessica Posted February 8, 2007 Share Posted February 8, 2007 Read the topic about header errors. Is there spaces before your <?php Link to comment https://forums.phpfreaks.com/topic/37628-cannot-send-session-cache-limiter/#findComment-180003 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.