Part 9-Admin Panel(Logout): Logout System with Session Destroy in php

As per the video, we have already downloaded the files and linked the CSS and JS.

Step 1: Create a page and paste the below code where you want to set the Logout Button :

<form action="logout.php" method="POST"> 
      <button type="submit" name="logout_btn" class="btn btn-primary">Logout</button>

Step 2: Create a page with the name logout.php and paste the below code.

    header('Location: login.php');


© Copyright - 2018 - 2023 | All rights reserved at Funda of Web IT