mrjameer Posted November 1, 2006 Share Posted November 1, 2006 hi,A visitor selects some options from a page and press the submit button,then the second page shows his selected options and there he fill his details and again press the submit button then the selected options with his details is stored in dbi have used sessions to move the data from one page to another.with localhost it is working good but when i upload the scripts to my site it is showing following warnings.how to overcome with this.Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/comm/public_html/local_dynamic/br.php:6) in /home/comm/public_html/local_dynamic/br.php on line 168your help will appreciated.thanksmrjameer Quote Link to comment https://forums.phpfreaks.com/topic/25826-problem-with-php-sessions/ Share on other sites More sharing options...
Ninjakreborn Posted November 1, 2006 Share Posted November 1, 2006 Have session_start();at the start of each pagewith no spaces at the top<?phpsession_start();?>copy and paste that code at the very, very, very top of the page. Quote Link to comment https://forums.phpfreaks.com/topic/25826-problem-with-php-sessions/#findComment-117923 Share on other sites More sharing options...
wildteen88 Posted November 1, 2006 Share Posted November 1, 2006 The problem is you have some form of output on/near line 6 in br.php which causing the header already sent error message to appear.You cannot have any output, be it html, whitespace characters, text etc before the use of session_start.What is being outputted on line 6 in br.php. Post lines 3 to 9 here from br.php Quote Link to comment https://forums.phpfreaks.com/topic/25826-problem-with-php-sessions/#findComment-118011 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.