--> Does the Cookie ($_COOKIE['pwd']) have the correct value? NO
---->
Has the user submitted the correct password via POST form? NO
---->
Display
Login Form
 
    |
| YES
|
V
 
    |
| YES
|
V
  |
Exit Program
Don't Display
Rest of Page
 
Display Page

  Write Cookie

Display Page