Hi! I've been trying to work on with my very own PHP login script(PHP+MySQL). Managed to get the login part work with cookies. Is there a better way to do it? I was wondering if HTML5 gives a new point of view in building a login system..
But so far I have also a problem. How can I prevent an inlogged user not to see the actual login page.(in this case login.php which contains the login form, which gives all login data to takelogin.php) I tried making a PHP script in the top of login.php: when an inlogged person hits url ..../login.php, it first checks if there is allready a cookie registered with his username. If there is, then it redirects to user home page. If there's not, login.php loads completly.
That idea didn't turn out well. Or I just couldn't figure it out in right way. So can someone consultate me with this? :)
Thanks for your reply, pritaeas! :) It was a good advice to look back to code i've been writing. Actually it works now! As you said idea works just fine. I did a minor mistake with marking. Instead of doing it like this
it should be written like this
So as a statement IT SEEMS TO WORK NOW! THANKS!
For the HTML5 question, I am totaly new with it. Just read an article about it and there was something said HTML5 has an ability to store data etc... So I thougt if that could replace somehow MySQL as a storage of data.