how to destroy sessions in php so that when i click on the back button in the

  • Thread starter Thread starter sweta agarwal
  • Start date Start date
S

sweta agarwal

Guest
browser i should not see last pg? hi !sweta here! i need php script to destroy session such that when i click on the back button in the browser,i am not able to view the last page visited..can anyone help me please to get rid of this problem..??? i am working in linux platform .
 
use Session_destroy ()

ession_destroy() destroys all of the data associated with the current session, however it does not unset any of the global variables associated with the session, nor does it unset the session cookie.

eg:
<?php
// you have to open the session first
session_start();

//remove all the variables in the session
session_unset();

// destroy the session
session_destroy();
?>
 
Back
Top