php session problem
Posted: Sat Nov 27, 2010 3:10 pm
hello,
I am beginner in php.....I got a problem in following script
<?php
session_start();
$logout = $_POST['logout'];
if(isset($logout)){
unset($_SESSION['uname']);
unset($_SESSION['password']);
session_destroy();
header('location:registrationform.php');
}
?>
according to the above script when i click on logout button my page go to my registrationform page but when i click back button in my browser it goes back to above script means to the logout page....what is the reason for that......i also want to know how to setup my session from login till logout.
thanks in advance.
I am beginner in php.....I got a problem in following script
<?php
session_start();
$logout = $_POST['logout'];
if(isset($logout)){
unset($_SESSION['uname']);
unset($_SESSION['password']);
session_destroy();
header('location:registrationform.php');
}
?>
according to the above script when i click on logout button my page go to my registrationform page but when i click back button in my browser it goes back to above script means to the logout page....what is the reason for that......i also want to know how to setup my session from login till logout.
thanks in advance.