In Chapter 9, I wrote many versions of the login.php and logout.php scripts, using variations on cookies and sessions. Here I’ll develop standardized versions of both that adhere to the same practices as the whole application. The login query itself is slightly different here in that it also checks that the active column has a NULL value, which means that the user has activated their account.
Require the configuration file and the HTML header. ...