About Login Page Pbm

Reply

Join Date: Jun 2008
Posts: 47
Reputation: punithapary is an unknown quantity at this point 
Solved Threads: 0
punithapary punithapary is offline Offline
Light Poster

About Login Page Pbm

 
0
  #1
Sep 11th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: About Login Page Pbm

 
0
  #2
Sep 11th, 2008
use this code in your welcome page:
  1. <?
  2. session_start();
  3. if(!isset($_SESSION['your_user_session']))
  4. {
  5. header("location:login.php");
  6. }
  7. ?>
Last edited by Shanti Chepuru; Sep 11th, 2008 at 5:31 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 70
Reputation: forzadraco is an unknown quantity at this point 
Solved Threads: 1
forzadraco forzadraco is offline Offline
Junior Poster in Training

Re: About Login Page Pbm

 
0
  #3
Sep 11th, 2008
in logout code.. unregister and destroy your session and put shanti's code in top of your page admin code
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 47
Reputation: punithapary is an unknown quantity at this point 
Solved Threads: 0
punithapary punithapary is offline Offline
Light Poster

Re: About Login Page Pbm

 
0
  #4
Sep 12th, 2008
Hi,
Your telling to use session but in my login page i used cookies.
By,
PunithaPary

Originally Posted by forzadraco View Post
in logout code.. unregister and destroy your session and put shanti's code in top of your page admin code
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,073
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: About Login Page Pbm

 
0
  #5
Sep 12th, 2008
see this link will help you:
http://www.phpnerds.com/article/using-cookies-in-php/2

Logic is same for cookies or sessions.
Last edited by Shanti Chepuru; Sep 12th, 2008 at 3:08 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC