This is the php code i have in my logout.php file:
<?php session_start(); session_unset(); session_destroy(); header('Location: index.php'); exit(); ?>
While starting the session, I set the variables username and password.
My logout file isn't working properly.
When i click logout, it leads me to my home page (index.php), but on clicking backspace i again go back to my profile page. What changes should i make in my logout.php file so that i'd stay on my home page even if i clicked backspace?
I know it is a simple code, but it is not working for me. Help a beginner out, please. Thanks in advance :)