todayme Posted March 6, 2007 Share Posted March 6, 2007 I am also having problems, as you can see below. Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/admin/domains/sold.au.com/public_html/test8.php:2) in /home/admin/domains/sold.au.com/public_html/connectorexit.php on line 24 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/admin/domains/sold.au.com/public_html/test8.php:2) in /home/admin/domains/sold.au.com/public_html/connectorexit.php on line 24 Link to comment https://forums.phpfreaks.com/topic/41369-has-anyone-a-good-simple-session-example-they-could-share/ Share on other sites More sharing options...
kenrbnsn Posted March 6, 2007 Share Posted March 6, 2007 No output can be generated before the "session_start()" function is called. Please post the code that is causing the problem. Place the code between tags. Ken Link to comment https://forums.phpfreaks.com/topic/41369-has-anyone-a-good-simple-session-example-they-could-share/#findComment-200427 Share on other sites More sharing options...
todayme Posted March 6, 2007 Author Share Posted March 6, 2007 // puts the "friends" info into the $info array $info = mysql_fetch_array( $data ); $accountsession = $info['ID']; session_start(); session_register($accountsession); if(mysql_num_rows($data) < 1) { print "Authentication Failed"; session_unset(); session_destroy(); print "Session Destroyed"; exit(); Link to comment https://forums.phpfreaks.com/topic/41369-has-anyone-a-good-simple-session-example-they-could-share/#findComment-200428 Share on other sites More sharing options...
legohead6 Posted March 6, 2007 Share Posted March 6, 2007 put your session_start(); at the very top of your page right below your <?php Link to comment https://forums.phpfreaks.com/topic/41369-has-anyone-a-good-simple-session-example-they-could-share/#findComment-200459 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.