I am trying to create an authentication mechanism for my PHP application, and it’s hard for me to handle this session. I tried to disable the authentication token that was previously set in the session array and destroyed the session through
session_destroy,
and also completely reset the array of sessions before destroying the session. I call the header function and return to the index.php page at the end of the function calls. I also tried
session_write_close
to close the session. When I register a user, I do a vardump session, and it does not show any data, however, when I return to the index.php page, I return the user authentication data. I also did a vardump of the Post data just to make sure that I didn’t somehow resend the authentication mail handler.
Any suggestions on what to do here?
source
share