Jump to content

Preventing from going to bak page.


peacemaker

Recommended Posts

Hi i am new to this forum,my problem is i need to know how can i prevent user from viewing back page again. Wats happening is , when user logout then i kill session with following functions

                session_start();
	session_unset('valid');
	session_destroy();

	setcookie('valid');

	header('Location:index.php');

but here the cookies and the session remain maintained. after this if user press back button , it should redirect to login page. Its not happening as the session remain maintained.

Can any one guide me plz , this is project is uploaded and giving me problem, so can any one help me out. Thanks .

i am giving my code for checking the validity of the session variable code as below

 

if(empty($_SESSION['valid']))
{
header('Location:index.php');
}
else
{	
remaining code for displaying text box for login
}

i want to check this code on every page so that user should not enter into the admin or the pmpage.

 

Link to comment
https://forums.phpfreaks.com/topic/172093-preventing-from-going-to-bak-page/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.