hi: why the setcookie() function must appear BEFORE the <html> tag?
thanks
eelixduppy
12:49 am on Mar 24, 2008 (gmt 0)
Because it sends data with the headers which needs to be sent to the browser before any output to the browser, including HTML.
g1smd
1:13 am on Mar 24, 2008 (gmt 0)
It's a bit like email, where the TO and FROM data must appear in the header that is sent out before the message itself is sent.
There's also a header ABOVE the HTML page, one that you normally don't see in a browser. Use the Live HTTP Headers extension for Mozilla Firefox and Mozilla Seamonkey to investigate it.