Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 17th, 2006, 11:43 AM   #1
anarki
Newbie
 
Join Date: Oct 2005
Posts: 5
Rep Power: 0 anarki is on a distinguished road
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.
anarki is offline   Reply With Quote
Old Feb 17th, 2006, 12:33 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Feb 17th, 2006, 12:49 PM   #3
anarki
Newbie
 
Join Date: Oct 2005
Posts: 5
Rep Power: 0 anarki is on a distinguished road
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.
anarki is offline   Reply With Quote
Old Feb 17th, 2006, 1:13 PM   #4
MrMan9879
Programmer
 
MrMan9879's Avatar
 
Join Date: Sep 2005
Location: Nanaimo, BC, Canada
Posts: 95
Rep Power: 0 MrMan9879 is an unknown quantity at this point
Send a message via MSN to MrMan9879
I think he means that you should be putting your code in between code tags.
MrMan9879 is offline   Reply With Quote
Old Feb 17th, 2006, 1:19 PM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:57 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC