Cannot modify header information - headers already sent by ...

Discussion in 'PHP' started by leandar, Jun 3, 2009.

  1. #1
    where is the white space here ?

    error was in this line ... please someone help me
     
    leandar, Jun 3, 2009 IP
  2. dannywwww

    dannywwww Well-Known Member

    Messages:
    804
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Add ob_start(); after the <?php and ob_end_flush(); before ?>.
     
    dannywwww, Jun 3, 2009 IP
  3. leandar

    leandar Well-Known Member

    Messages:
    3,929
    Likes Received:
    108
    Best Answers:
    0
    Trophy Points:
    170
    #3
    col, thanks for your help now its working :)

    but just i remove that code before your reply, that was also working as well let me know what will happen if i dont use that code > setcookie ("namec", $c_name,time()+7*24*3600); /* 1 week cookie expiration */ < is it important ?
     
    leandar, Jun 3, 2009 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    The code above just sets the expiration time for the "namec" cookie to 1 week. I dunno what that cookie does, or why you need one week expire time one it, so I can't say if it's important or not.
     
    PoPSiCLe, Jun 3, 2009 IP
  5. leandar

    leandar Well-Known Member

    Messages:
    3,929
    Likes Received:
    108
    Best Answers:
    0
    Trophy Points:
    170
    #5
    its one of chan site, dont know why its 1 week i downloaded this code.

    btw thanks for all help, my problem solved :)
     
    leandar, Jun 3, 2009 IP