Php login scriptThis php script is a good example for what a simple login system could do. It has two files, index.php and engine.php. Index.php will take the username and password and sent it to engine.php who will process the information sent and start the $_Session (login session).
To make it work, you need to edit: $user and $pass from engine-login.php with your desired username and password.
To apply the loggin session to other webpages, not only just index.php simply add session_start; ?> as the first lines of that page.
To logout create a logout.php page and add:session_start(); session_destroy(); with the php ?> marks.
Rewies & comments: Learn php | Twitter | We recomend: Boost your website here |