|
Sessions use cookies.
You can't have a single line printed to the client otherwise, the headers are sent. You can't send the headers twice.
Cookies must be sent before ANYTHING else in the page because they go in the header. Thus this code will only work if it's the first thing in your document.
|