sending session cookie

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hasyalea
    New Member
    • May 2007
    • 2

    #1

    sending session cookie

    Hi everyone!
    I'm new in php. I have a project to be completed soon. I have to do a web survey. I used session to pass the respondent Id from one page to another. My problem is, when I add a html code for the background color, I got a warning-"cannot send session cookie-headers already sent by (output started at ...). When I didn't add the html script, the session cookie can be sent, but I didn't get a coloured background. how to insert background color using php instead of using html?

    Thanks
  • vituko
    New Member
    • Dec 2006
    • 48

    #2
    Evry command that send headers (session_start( ), for example) must be, in your code, before any output, even a break line outside a php area.

    ---------------begin-------------------------

    (break line)

    <?
    session_start() ;
    ?>

    ERROR !!!!!!!!!!!!!!! !!!!!!

    Comment

    • hasyalea
      New Member
      • May 2007
      • 2

      #3
      Originally posted by vituko
      Evry command that send headers (session_start( ), for example) must be, in your code, before any output, even a break line outside a php area.

      ---------------begin-------------------------

      (break line)

      <?
      session_start() ;
      ?>

      ERROR !!!!!!!!!!!!!!! !!!!!!




      Thanks buddy!
      The prob solved

      Comment

      Working...