Re: [PHP] Logout help needed

2005-07-13 Thread Ahmed Saad
Hi Suma,

On 7/11/05, suma parakala [EMAIL PROTECTED] wrote:
 Since i have placed logout in head frame its being logged out from head
 frame only. How i can log out from all three frames. anyone please help me
 Thanks

Redirect the user to another page, which loads in the main window (not
in a frame), that logs the user out. Something like a
href=logout.php target=_top /Logout/a

-ahmed

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] LOGOUT - Reset Session

2003-01-31 Thread Jason Wong
On Friday 31 January 2003 15:50, Keith Spiller wrote:
 Hello Everyone,

 I'm trying to create a Logout Function and Link.  My site uses a standard
 htaccess file for its authentication method.  After the brower requests the
 username and password they have access to the protected site.

 Then users can jump to a special Messaging section where I wrote a php
 script that retieves the $REMOTE_USER value and checks it against a message
 database.

 My problem is that I'd like to have a logout link that will dump the values
 the user had entered for their username and password so that they can no
 longer access the messages, neither with a back button nor just by going
 back to the site url.  But since I am retrieving the $REMOTE_USER value
 using PHP4, it seems some how it remebers the username and password.

Yes, that's because after HTTP authentication, each time the browser requests 
a page it'll send the user and password as well.

  Is
 that because I need to destroy the session and remove or replace the
 session cookies?  I do not know what the session name is, nor how to check
 it.

HTTP authentication are not related to sessions.

Have a look in the manual  HTTP authentication with PHP


-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
New members are urgently needed in the Society for Prevention of
Cruelty to Yourself.  Apply within.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Logout

2002-05-27 Thread Sagie Maoz

Jonas ? wrote:

 1. I'm building this community thing and I have a text file with the 
 users that is currently logged in. When they press logout there name 
 is deleted from the textfile, but if they just close there browser or 
 surf to another site there name is still in the text-file until they 
 log out next time. Any ideas how to avoid this? 

What you should do is save for each user the last time he was seen in 
the site: the value of this time is updated for each page he or she 
loads. Then, when checking to see if a user is currently logged in, you 
check how long ago was he last seen. If it was more than X 
seconds/minutes/etc. (this is for you to set), she is considered 
offline and you can remove him from the file.

Best Regards,
Sagie Maoz
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Logout

2002-05-27 Thread Thalis A. Kalfigopoulos

On Mon, 27 May 2002, Jonas Hörnblad wrote:

 Hi there,
 I've only been PHPing for some week and ofcours I've ran into my first two 
 problems.
 
 1. I'm building this community thing and I have a text file with the users 
 that is currently logged in. When they press logout there name is deleted 
 from the textfile, but if they just close there browser or surf to another 
 site there name is still in the text-file until they log out next time. Any 
 ideas how to avoid this?

Dump the text file and use sessions. Will make your life easier and they provide easy 
solutions to problems like logout.


 2. How do I sort an array? I've tried array_multisort(); but I can only 
 ascci-sort my array which makes R come before j and so on. How do I sort 
 alphabeticly and not case sencetive ascci?

There are plenty of XXsort() functions in the manual (hint!hint!). Your case needs 
natcasesort().
Or you can do it manually with usort() and implement your own comparision function.


cheers,
thalis

 
 Thanks
 /Jonas
 
 
 _
 MSN Photos is the easiest way to share and print your photos: 
 http://photos.msn.com/support/worldwide.aspx
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Logout problem - help me out....!

2001-12-15 Thread Shane Wright


HTTP authentication (which is what you're using) is controlled by the 
browser.  Some browsers even keep the login/password after the window is 
closed until the user logs out (Konqueror on Linux for one...)

If you want more control over logins and the ability to do a logout, you 
should make your own login scheme using an HTML form for username/password 
and setting a cookie to flag that the user is 'logged in'.  Then, when the 
user wants to log out, clear the cookie and job done :)

--
Shane

On Saturday 15 Dec 2001 5:37 am, J.F.Kishor wrote:
 hello all,

   I have already posted this mail, Is there anyone to help me out?,
 it's urgent plz.!

I have designed a web page using php, as a security measure I have
  kept it password protected. I have used Apache authentication, using
  htpasswd file. Now I want to keep a logout in this web page, I tried to
  send a header request http/1.0 401 Unauthorized to force it to
  reauthenticate when the logout link is clicked in the form, but this dose
  not work.

  I tried using session_destroy() even that does not work.

  To get the authenticated users name I have used GetEnv(REMOTE_USER) in
  all the form and with that username I'am handling mysql and other
 requests. I don't know where exactly the REMOTE_USER gets stored.

  So please help me out in this problem. I want to remove the
  window's authentication cache.

  Please give me some ideas and suggestion to remove the user name and make
  the page fresh for the other user to log in.

  If possible please send me a sample script.

 Thanks for sparing time on this mail.

 with hope's,
   - JFK

 kishor
 Nilgiri Networks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] logout

2001-06-20 Thread Rasmus Lerdorf

change the realm

On Wed, 20 Jun 2001, Jacky wrote:

 Is there anyway I can do the logout that will completely get rid of all login detail 
without having user to close browser?
 Jack
 [EMAIL PROTECTED]
 Love your enemies, it will drive them nuts





Re: [PHP] logout

2001-06-20 Thread Thomas Deliduka
Title: Re: [PHP] logout



On 6/20/2001 6:34 PM this was written:

Is there anyway I can do the logout that will completely get rid of all login detail without having user to close browser?


What type of authentication are you using?

If it's a cookie, reset the cookie, if it's http authentication I'm not sure.
-- 

Thomas Deliduka
IT Manager
-
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/







RE: [PHP] logout

2001-06-20 Thread Richard Heyes

 Is there anyway I can do the logout that will completely get rid of
all login  detail without having user to close browser?

Depends on how your login system works.
--
Richard Heyes




RE: [PHP] logout

2001-06-20 Thread Robert Covell



Yes,
What I 
have found out is that if you change the realm name the browser (IE and NS) 
empty the cache for the current authentication and force a re-auth. We 
append a time stamp to our realm, so they have 1 minute to login before it will 
change again. If you combine this with sessions and remember the state: 
authorizing, logged in, not logged in (default) you can manage the entire 
process.

As of 
right now,there is no way to tell the browser to "Log Out". Some 
combination of the above must be used.
Sincerely,Robert T. CovellPresident / OwnerRolet 
Internet Services, LLCWeb: www.rolet.comEmail: 
[EMAIL PROTECTED]Phone: 816.210.7145Fax: 816.753.1952 

  -Original Message-From: Jacky 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 20, 2001 
  5:35 PMTo: [EMAIL PROTECTED]Subject: [PHP] 
  logout
  Is there anyway I can do the logout that will completely get rid of all 
  login detail without having user to close browser?
  Jack[EMAIL PROTECTED]"Love 
  your enemies, it will drive them nuts"


Re: [PHP] logout

2001-06-20 Thread Andreas D. Landmark

At 20.06.2001 23:34, you wrote:
Is there anyway I can do the logout that will completely get rid of all 
login detail without having user to close browser?
Jack

I guess you could overwrite it with other logindetails by redirecting the 
user to a webpage
that requests a username/password that is different to the one that is 
cached in the browser.
But apart from that hard workaround, i don't think you can easily flush the 
logincache from
the serverside...


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] logout

2001-06-20 Thread PHPBeginner.com



Hey, 
this has been asked here like ten times today only...

Depends, usually you should be able to. Like, set them a cookie on logout 
button and, as long as they have it don't let them in.
Silly method, I know, try also deleting cookies you have just set to the 
user when they logged in.

One 
of those solutions will work.

P.S:
"Love your signature"


Sincerely,
Maxim Maletsky Founder, Chief Developer 
PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com  
 

  -Original Message-From: Jacky 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, June 21, 2001 
  7:35 AMTo: [EMAIL PROTECTED]Subject: [PHP] 
  logout
  Is there anyway I can do the logout that will completely get rid of all 
  login detail without having user to close browser?
  Jack[EMAIL PROTECTED]"Love 
  your enemies, it will drive them nuts"


Re: [PHP] logout

2001-06-20 Thread Steve Werby

Jacky [EMAIL PROTECTED] wrote:
 Is there anyway I can do the logout that will completely
 get rid of all login detail without having user to close browser?

If you're using sessions session_destroy() will do it.  Create a link or
form button that calls that function.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] logout

2001-06-20 Thread hamoe

if your login system is cookie-based vs querystring. just send a 
blank cookie to the user to replace whatever you had set.

if your login system has the query string for a session id or something, just 
stop sending the querystring ;)



On Wednesday 20 June 2001 07:02, Richard Heyes wrote:
  Is there anyway I can do the logout that will completely get rid of

 all login  detail without having user to close browser?

 Depends on how your login system works.
 --
 Richard Heyes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] logout

2001-06-20 Thread Merio, Quinn


This is how i did it.

1. Create a session variable after someone logs in properly (upon
verification)

// Set the session variable for clientId
$session_clientId = $row['clientId'];

2. All the other pages wont allow you to view them unless the session var is
set.
   and if you try to change the url parameter of another variable, you are
denied too.

session_register (session_clientId);

if($session_clientId == ){
die('Sorry, but you do not have permission to view this page -
please a   href=client_login.phplogin/a');}

if($clientId != $session_clientId){
die('Sorry, this is not one of your projects.br Please use the
back button of your browser to return or 
a href=client_login.phplogin/a');} 
//clientId was set from a previous query.


3. When you click on logout, you are sent back to the login page.

4. If the session was set, then session is destroyed.

// Clears the user session for logging out.
session_register (session_clientId);
if ($session_clientId  0 ){
session_destroy ();
} 

5. Voila.. when you use the back button, you are prevented from seeing the
page.

hth,
q.

-Original Message-
From: Richard Heyes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 8:02 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] logout


 Is there anyway I can do the logout that will completely get rid of
all login  detail without having user to close browser?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Logout Problem auf .htaccess-Login

2001-05-01 Thread Krznaric Michael

Don't quote me on this, but I think if you send the user a header saying
he's unauthorized then apache will remove the PHP_AUTH_* information.

Mike


-Original Message-
From: Jochen Kaechelin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 4:30 AM
To: PHP General
Subject: [PHP] Logout Problem auf .htaccess-Login


Hello List!

Is it possible to unset $PHP_AUTH_USER and $PHP_AUTH_PW after
a successfull '.htaccess-login'?

I wan't to give all users the possibility to 'logout'.
I will destroy all sessions and unset $PHP_AUTH_USER,
but Apache still knows that there was a successfull login
a few minutes before.

Thanx

-- 
phpArbeitsgruppe in Gruendung - Jochen Kaechelin
Stuttgarter Str.3, D-73033 Goeppingen
Tel. 07161-92 95 94, Fax 07161-92 95 98
http://www.php-arbeitsgruppe.de, mailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Logout Problem auf .htaccess-Login

2001-05-01 Thread Matt Schroebel

$PHP_AUTH_USER= ought to do it.

 From: Jochen Kaechelin [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 01, 2001 4:30 AM
 
 Is it possible to unset $PHP_AUTH_USER and $PHP_AUTH_PW after
 a successfull '.htaccess-login'?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] logout

2001-02-27 Thread [EMAIL PROTECTED]

Sorry, it was my mistake. There is session used to store userID and password
after the successful login. I don't under stand what you mean about to clean
up variables, how?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Yamin Prabudy [EMAIL PROTECTED]
To: Jacky@lilst [EMAIL PROTECTED]
Sent: Tuesday, February 27, 2001 2:40 AM
Subject: Re: [PHP] logout


 but still you had the variable hanging on the cookies while you are
running
 the login function...
 just clean out all the variables and then you had a log out function
(clean
 all the cookies) if you don't used cookies how do you transfer all the
login
 variable ?
 - Original Message -
 From: Jacky@lilst [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, February 28, 2001 4:14 AM
 Subject: [PHP] logout


 I have php site that user is required to login, but I don't have logout
 function yet. Is there anyone know the most practical way of logout method
 that people use nowadays?, in php I mean. There is no session or cookies
 used in this site.
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] logout

2001-02-27 Thread John LYC

if you are using session
session_destroy might do the trick...



"Jacky@lilst" wrote:

 Sorry, it was my mistake. There is session used to store userID and password
 after the successful login. I don't under stand what you mean about to clean
 up variables, how?
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"
 - Original Message -
 From: Yamin Prabudy [EMAIL PROTECTED]
 To: Jacky@lilst [EMAIL PROTECTED]
 Sent: Tuesday, February 27, 2001 2:40 AM
 Subject: Re: [PHP] logout

  but still you had the variable hanging on the cookies while you are
 running
  the login function...
  just clean out all the variables and then you had a log out function
 (clean
  all the cookies) if you don't used cookies how do you transfer all the
 login
  variable ?
  - Original Message -
  From: Jacky@lilst [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, February 28, 2001 4:14 AM
  Subject: [PHP] logout
 
 
  I have php site that user is required to login, but I don't have logout
  function yet. Is there anyone know the most practical way of logout method
  that people use nowadays?, in php I mean. There is no session or cookies
  used in this site.
  Jack
  [EMAIL PROTECTED]
  "There is nothing more rewarding than reaching the goal you set for
  yourself"
 
 
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] logout

2001-02-27 Thread John LYC

for cookie...
just setcookie() of the same cookiename to null;


"Jacky@lilst" wrote:

 I have php site that user is required to login, but I don't have logout function 
yet. Is there anyone know the most practical way of logout method that people use 
nowadays?, in php I mean. There is no session or cookies used in this site.
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for yourself"


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] logout and clean up session and cookies

2001-02-27 Thread Richard Lynch

Can anyone guide me how to do the logout function that can get rid off
session and cookies? Both are used to store userID and password through the
site.

session_destroy();
SetCookie("SID", "");

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]