PHP Sessions Error
- by Andrei Korchagin
I'm new to PHP sessions and I've come across the following error:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at somefile:someline).
As well as this one:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent by (output started at somefile:someline).
The session_start(); is the very first thing in all of my code. I'm not sure what the problem is. It gave me line numbers but all I do on those lines is start the session.
Also - I have a portion of code whose POST action is another PHP page. How can I set a $_SESSION variable pertaining to this page within that action page?