Week 1 5
Week 2 5
Week 3 6
Week 4 4
Week 5 0No items in this section
Week 6 0No items in this section
Finale 0No items in this section
In this tutorial, we will create a logout script. So that user can log out of his account. When logging out, you need to destroy all sessions, so that next time user needs to log in again with his/her user id and password.
- Create a page logout.php.
- Copy and paste the below code to this.
<?php session_start(); session_destroy(); echo '<script>alert("Logout Success");window.location.assign("index.php");</script>'; ?>