Log Out Button

admin

Administrator
Staff member
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. <br /><br />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. <br /><br />THANKS!<br />NEW MEMBER TO THE FORUMS, NEW TO WEB DESIGN, AND A VERY QUICK LEARNER!!<!--content-->
What sort of login are you using? Does it set up a cookie on the PC logging in?<!--content-->
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 <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /><!--content-->
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.<br /><br />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?" <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/whip.gif" style="vertical-align:middle" emoid=":whip:" border="0" alt="whip.gif" /><!--content-->
[About the caps: Read up on Nettiqute. Caps = Yelling]<br /><br />1) If you close the browser without logging out, you will still be logged in. That's how things work (to my understanding).<br /><br />2) Are you using PHP and using sessions? Then do the following<br /><br />Create a link to a file such as: LOGOUT.PHP<br />in LOGOUT.PHP:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><?<br />$result_unreg = session_unregister("valid_user");<br />$result_dest = session_destroy();<br />?><!--c2--></div><!--ec2--><br /><br />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.<br /><br />At least give that second line a try and see if it works. I hope that helps!<!--content-->
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 <a href="http://www.google.com/search?sourceid=navclient&ie=UTF-8&q=htaccess+logout" target="_blank">htaccess logout</a> to get started. I would also get with CCBill and see if the offer a better solution.<!--content-->
 
Back
Top