hi all,
i had a logout page wer i am destroying the session value. so now i am logging out from a page and if i click browser back button it is going back to that page, so i placed a code in that page

<?php 
if(!isset($_SESSION['username']))
header("Location:http://10.70.2.142/Project/login.php");
ob_end_flush(); 
?>

it is working but i had a meta refresh on my page so wen i click back button it is moving to the back page and if that meta content is 3 sec,so wen i click back button i can see the values in that page for 3 sec. so wat is happening is the page should be refreshed every time wen i cum back to this page. that makes me problem.

Recommended Answers

All 2 Replies

just at a quick glance i am not seeing a session_start() at the top of your code.

i didnt post the whole code. just to have a clear idea abt wat i had done after logout button clicked,i had posted only that part. session_start() is already present.

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.