It is important for a user to be able log out so that the another user cannot use the same computer with previous user still login. The Logout behavior will be used to destroy a session variable.
The code that will be created will perform the following tasks:
PART A: ADD STATIC CONTENT
Add Static Logout buttons
PART B: ADD DYNAMIC SCRIPT
Add Logout Script
PART A: ADD STATIC CONTENT
Add Static Logout Buttons
Open the EMPLOYEE MASTER PAGE (master_page.php) and add the following highlighted code in the <div data-role="header"> container:
CHECK POINT: Save the file. Open the EMPLOYEE LOGIN page (index.php), provide a valid username and password, and then click the LOG IN button. Navigation to any of the following pages and then click the Logout button. You should be taken back to the EMPLOYEE LOGIN page (index.php).