mc_keny Posted November 24, 2007 Share Posted November 24, 2007 ok here is the thing when ever i place session_start at the top of every page i get this error Warning : session_start(): Cannot send session cache limiter - headers already sent (output started at /home/www/v3 .farvista.net/signin.php:8) in /home/www/v3.farvis ta.net/signin.php on line 13 72034 logged in successfully as test ( Proceed! ) whats wrong Link to comment Share on other sites More sharing options...
Lulzim Posted November 24, 2007 Share Posted November 24, 2007 (output started at /home/www/v3 .farvista.net/signin.php:8)/home/www/v3.farvis ta.net/signin.php on line 13 obviously you're not placing the session_start() at the top of the page. make sure you're not including a page that contains a session_start()Or buffer the output (http://php.net/ob_start) Link to comment Share on other sites More sharing options...
mc_keny Posted November 25, 2007 Author Share Posted November 25, 2007 what happen after the the user login successfull i do this session_register(name);session_register(pass); then put this on every page if(!session_is_registered(name));{echo "your not logged in";} iam not good with the session function as yet Link to comment Share on other sites More sharing options...
Synook Posted November 25, 2007 Share Posted November 25, 2007 Umm... you don't need to use the session functions any more, you can just use the $_SESSION superglobal array to access the session vars (unless you are using PHP 3- ) $_SESSION['name'] = true; //Or the username if you like//Why need session_register(pass)?then put this on every page if(!isset($_SESSION['name'])) {echo "your not logged in";//You could even redirect them to the login page:header("location:login.php");exit();} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.