I m trying to create an authentication mechanism for my PHP Application and I m having difficulty destroying the session. I ve tried unsetting the authentication token which was previously set within the session array and destroying the session through
session_destroy
,
as well as resetting the session array completely before destroying the session. I m calling the header function and going back to my index.php page at the end of the function calls. I ve also tried
session_write_close
to handle closing the session. When I log the user out, I do a vardump of the session, and It shows no data present, however when I go back to the index.php page, I m getting back the user authentication data. I also did a vardump of the Post data just to ensure I m not somehow resubmitting the post authentication handler.
Any suggestions on what to do here?