Jump to content


Cannot Modify Headers Error


1 reply to this topic

#1 JoeVincetti

    Young Padawan

  • Members
  • Pip
  • 82 posts

Posted 25 September 2005 - 03:36 PM

I need to set a cookie in the middle of a php script that includes html. There is no way to move my cookie elsewhere in the script, so i was wondering would there be a way to set a cookie in the middle of a script. (i think i need to use ob_flush()?)

Sorry, Im sure this question has been answered before. I was unable to find the answer when I searched for one.

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 25 September 2005 - 03:43 PM

Ironically enough, somebody asked the exact same question, with almost the exact same topic title before: http://www.pixel2life.com/forums/index.php...11768&hl=header

Also, if you went to php.net, and looked at the cookie functions, you'd know that function was ob_start(), with a few ways of getting the html to the browser, one of which being ob_end_flush()





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users