Logging In |
||||||||||
When the login form is submitted, hr.php is requested again. However, the application state will ensure that do_login() is invoked again with the username and password supplied. In this case, do_login() uses the db_connect() database function to authenticate the username and password as valid. If the username and password are valid, the do_login() function does the following:
Note: The login code is simplified for the purposes of this tutorial. Ideally, you would use a single transparent database login and query a database table to authenticate HTTP session login requests.
|