Some notes on implementing login access to websites.

Login: Simple

PHP sessions are used to password protect web pages and parts of webpages. The empty() function is used to test the value of the session variable that indicates whether the user is logged in or not.

Login System

Here we implement a sign-up and login system that stores users' email addresses and hashed passwords in an SQLite database. When a user logs in a session is started which enables the id of the user to be accessed and therefore the website can be personalised for them.

This system was written before the Login: Single User code. and would benefit from adopting some of that code especially the empty() function.