Hi

I created one website with login form.In that form after login with username and password i entered into welcome page after that i clicked logout then my page gets logout then i clicked back option in my browser that time it shows well come page i want to avoid this pbm from my website can anyone tell me how to avoid this

thanks in advance
PunithaPary

use this code in your welcome page:

<?
session_start();
if(!isset($_SESSION['your_user_session']))
 {
 header("location:login.php");
 }
?>

in logout code.. unregister and destroy your session and put shanti's code in top of your page admin code

Hi,
Your telling to use session but in my login page i used cookies.
By,
PunithaPary

in logout code.. unregister and destroy your session and put shanti's code in top of your page admin code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.