Hi there! I'm new to session management and I'm having some problems within it. I'll try to be as clear as I can (even with my bad english 😛 ).
My website has a functions.php (where I put all functions needed by the pages, this includes a check_session() function to check if the session is active, this function is called on every page). I also have a sessions.php which looks like this:
session_start();
session_register("SESSION") //this should be a associative array
the sessions.php is included in all pages I want to be "protected".
I also have a login pages that checks for a user name and pwd, and if they are correct I
set the $SESSION('login') = $username;
the check_session() functions checks this SESSION (login) and returns either true or false depending if it exists or not.
Well, unfortunatelly it is not working... Does anyone could help me with this problem? any suggestions, examples or good tutorials would be very nice.
Thank you all