I can do login realm in PHP and the way that I do it is by setting a session variable and check whether that session variable is set or not. On every restricted page, I check whether a certain session variable is set (or is equal to a certain value). If not, then i will send the user back to the login page. Is this the best way to do it? Is there a more secure way to do it?
Share
I’ve got a similar question on SO before, and here are the answers from security guys.
Put it short, you should think other things like SSL and password hashing, etc…
Hope this helps 🙂