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? :)