I've been working on a login system for my website for ages now. I've just finished modifying the UI and decided to get back to work on the login system.
I have a problem. To access the session variables (i.e. starting the session) I use the
session_start();
function, however, it returns these two errors:
Warning: session_start() [ FUNCTION.SESSION-START ]: Cannot send session cookie - headers already sent by (output started at /home/brezerd1/public_html/index.php:2) in /home/brezerd1/public_html/template.php on line 3 Warning: session_start() [ FUNCTION.SESSION-START ]: Cannot send session cache limiter - headers already sent (output started at /home/brezerd1/public_html/index.php:2) in /home/brezerd1/public_html/template.php on line 3
Even though, I'm running session_name before it. The session is being set by login_success.php (which occurs if checklogin.php validates the login).
Basically, I'm trying to keep the user logged in for all pages (until they log out of course).
I'd appreciate some help on this one, as it's been bugging me for a while.
Thanks.