I am attempting to use sessions to allow users to login into my site (to post comments for now, may be future enhancements). I am using PHP's sessions functions (session_start, session_register, etc).
Everything works fine, until I try to log out.
I have a login script. After successfully logging in, it displays a link to a logout script (since I'm only testing right now).
When I open the logout script I get a parse error:
"Warning: Trying to destroy uninitialized session in /var/www/html/logout.php on line 8"
I assume this is because I'm using two different files. Is there a way I can pass a session between scripts so that I can use a separate script to logout? Or do I need to have it all done in one script? If it needs to be one, then how will this work once I want users to do more than just write comments on my site?
--kinadian