mystryvxn Posted September 8, 2004 Posted September 8, 2004 HOW DO I PUT A LOG OUT BUTTON ON MY WEB PAGE? I HAVE A MEMBERS SECTION AND WOULD LIKE MY MEMBERS TO HAVE THE OPTION TO LOG OUT. WHEN I LOG IN AS A MEMBER AND CLOSE THE BROWSER WINDOW AND COME BACK LATER, I AM STILL LOGGED IN. I DON'T WANT THIS TO HAPPEN WITH MEMBERS WHO SHARE THEIR COMPUTER AND SOMEONE ELSE GOES TO MY SITE AND HAS ACCESS TO MY SITE ALREADY. AND AFTER A LOG OUT BUTTON, WHERE DOES IT DIRECT TO? I NEED TO BE ABLE TO HAVE A PAGE THAT CONFIRMS THAT THEY HAVE LOGGED OUT SUCCESSFULLY. THANKS! NEW MEMBER TO THE FORUMS, NEW TO WEB DESIGN, AND A VERY QUICK LEARNER!! Quote
newhorizonz Posted September 8, 2004 Posted September 8, 2004 What sort of login are you using? Does it set up a cookie on the PC logging in? Quote
borfast Posted September 8, 2004 Posted September 8, 2004 The answer totally depends on the script you have working on your site and also, I might add, on not writing your posts in ALL-CAPS Quote
mystryvxn Posted September 20, 2004 Author Posted September 20, 2004 Umm, ok. I have a membership site that requires a username/password. This is accomplished through the e-venue service provider, CCBill. So, I'm not sure what info you need to know from me. I'm a little new to this stuff but not totally clueless. Can you tell me what I need to do now or what exact info you need from me? Thanks. Oh, and I really didn't think that the caps were going to be such a big deal for you to even notice. Well, I guess its noticeable but not a big deal. I was going to go back and change it but thought that, "Gee, does it really matter?" Quote
erisande Posted September 20, 2004 Posted September 20, 2004 [About the caps: Read up on Nettiqute. Caps = Yelling] 1) If you close the browser without logging out, you will still be logged in. That's how things work (to my understanding). 2) Are you using PHP and using sessions? Then do the following Create a link to a file such as: LOGOUT.PHP in LOGOUT.PHP: ><? $result_unreg = session_unregister("valid_user"); $result_dest = session_destroy(); ?> The last line is what you really need to kill the session. The first line is assuming you have stored a value in $valid_user to keep track of the username during the session. You should unregister it so it is no longer in the browser memory. Otherwise, it can become a problem. At least give that second line a try and see if it works. I hope that helps! Quote
TCH-Dick Posted September 20, 2004 Posted September 20, 2004 According to CCBill they use HTTP Basic Authentication with Apache htaccess/htpasswd files. So closing the browser should be all that is needed to logout, but that does not always work. There are several workarounds for this problem but some only work for IE. Just search Google for htaccess logout to get started. I would also get with CCBill and see if the offer a better solution. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.