Jump to content

problem with php sessions


mrjameer

Recommended Posts

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 db

i 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 168

your help will appreciated.

thanks
mrjameer
Link to comment
https://forums.phpfreaks.com/topic/25826-problem-with-php-sessions/
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.