![]() |
http auth logout
Hi, here i am with another question ...
This time http auth, more specific the logout of an applicacion logged by this code: $auth = false; if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { $username = $_SERVER['PHP_AUTH_USER']; $password = $_SERVER['PHP_AUTH_PW']; $oMember->Set('username', $username); $oMember->Set('password', $password); $results = $oMember->SearchUser(); $number = count($results); if($number != 0) { $auth = true; } } if(!$auth) { header('WWW-Authenticate: Basic realm="My Auth"'); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else { echo 'Welcome ...'; $_SESSION['member_username'] = $username; $_SESSION['member_password'] = $password; echo "<meta http-equiv=\"Refresh\"content=\"2; URL=index.php?order=title\">"; } I cant make a working code for logout. In my best approachs the login windows appears again on the screen and when i hit enter the user loggout. The other approach that i am using rigth now is a javascript function who closes the browser. I need a clean logout for my users, any help will be appreciated. Thanx. |
And you still haven't read a "How to Post...." thread or the forum's rules/FAQ? Do you buy such selfish demand of member's free help, or does it come with the territory?
|
Whi i so selfish and fool for posting 1 questions??
I have two problems, i have to post one, wait and then post the other? Rules for posting are the same in all forums with small variations, so please dont think yours are so specials. If u want to answer something, please post something related with code, ethics can be discussed in another area ... I am insulting the community? i am posting bullshit? I think i am not, wheres the big deal? sorry for this .. it wasnt my initial intention when i register in the forum. |
I think he means that you should be putting your code in between code tags.
|
You are being thoughtless, perhaps. Or perhaps not. In an online atmosphere, one cannot tell. It's somewhat like a box of candy with chocolate-covered turds of various kinds mixed in. Are you thoughtless? Are you rude? Are you dumb? Are you merely ignorant (no sin, there)? Are you spoiled? We can't tell. Prejudging isn't fair, but it happens, believe me. You aren't alone in your approach to the forum for free answers (beats $60 hour, anytime), nor are you alone in not bothering to find out how the forum likes to work. All coding forums DO sort of have the same requests -- they involve tagging your code to improve its appearance and maintain its formatting. Can't handle that? So solly, Cholly. Stick around. Someone is likely to cater to you, just for practice. Don't bother to tell me how to respond to you. It's a waste of your finger's keying abilities. Here's your answer: your post, despite its technical basis, is, indeed, bullshit; you may get something, but you're owed nothing. If your life has worked for you that way, thus far, consider yourself fortunate.
|
| All times are GMT -5. The time now is 7:45 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC