Its very simple to How to make a Logout system using PHP and Mysql. This code will work after logged in to the user.

Follow the below code:

logout.php

<?php
	header("location:index.php");
?>

in the above code, ‘index.php’ is the login page.