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
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.