943,685 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 625
  • PHP RSS
Sep 11th, 2008
0

About Login Page Pbm

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
punithapary is offline Offline
48 posts
since Jun 2008
Sep 11th, 2008
0

Re: About Login Page Pbm

use this code in your welcome page:
php Syntax (Toggle Plain Text)
  1. <?
  2. session_start();
  3. if(!isset($_SESSION['your_user_session']))
  4. {
  5. header("location:login.php");
  6. }
  7. ?>
Last edited by Shanti C; Sep 11th, 2008 at 5:31 am.
Reputation Points: 137
Solved Threads: 162
Posting Virtuoso
Shanti C is offline Offline
1,641 posts
since Jul 2008
Sep 11th, 2008
0

Re: About Login Page Pbm

in logout code.. unregister and destroy your session and put shanti's code in top of your page admin code
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
forzadraco is offline Offline
70 posts
since Mar 2008
Sep 12th, 2008
0

Re: About Login Page Pbm

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

Click to Expand / Collapse  Quote originally posted by forzadraco ...
in logout code.. unregister and destroy your session and put shanti's code in top of your page admin code
Reputation Points: 10
Solved Threads: 0
Light Poster
punithapary is offline Offline
48 posts
since Jun 2008
Sep 12th, 2008
0

Re: About Login Page Pbm

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 C; Sep 12th, 2008 at 3:08 am.
Reputation Points: 137
Solved Threads: 162
Posting Virtuoso
Shanti C is offline Offline
1,641 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Fsockopen Problems
Next Thread in PHP Forum Timeline: Bullet creation in xml using PHP





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC