Search
Left Quote    Black holes are where God divided by zero.
- Steven Wright    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: log out problem
  This user is offline  robertlee
  Subject: "log out problem" Posted: @ 10:51 pm on Feb 04 2008   
Member #: 561
Rank: User - (2)
Since: 02/04/08
Posts: 2

i designed the members system and it works great.
the only problem i am having is that it won't log me out.
this is what my log out code looks like which is the same as the tutorial.
when i click logout.php, it takes me back to the main page but when i press back or type in the members page url, I'm right back in. The session never got erased... I echoed out on my main page to see after the logout and the redirect to the main page and it shows that its still logged_in = 1 and etc.
Is there something wrong with my logout code?

Code:
<?
$_SESSION['logg ed_in'] = 0;

setcookie('logi n_cookie', "", time() - 60, '/', '.sitename.com' );

session_destroy ();

header("Lo cation: http://www.site name.com";
?>



    Viewed: 6,148 Times | Reply to This | To top
  This user is offline  robertlee
  Subject: "re: log out problem" Posted: @ 11:56 pm on Feb 04 2008    
Member #: 561
Rank: User - (2)
Since: 02/04/08
Posts: 2

nm i figured it out..




    Viewed: 6,137 Times | Reply to This | To top
  This user is offline  David1159
  Subject: "re: log out problem" Posted: @ 12:11 am on Feb 05 2008    

Member #: 526
Rank: User - (81)
Since: 12/27/07
Posts: 81
From: usa

sitename.com isn't your site




Coding is simply CST... Combining $hit Together. We make different $hit to run in unison correctly.

    Viewed: 6,132 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: log out problem" Posted: @ 2:57 am on Feb 05 2008    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Good catch, David. Glad your issue was resolved!




-bs0d | AllSyntax.com

    Viewed: 6,128 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank