login to protected directory by php

[email protected] (Ali Asghar Toraby Parizy)
Newsgroups php.general
Message-ID <[email protected]>
Hi. I have a protected directory in my host. I have configured .htaccess
successfully and it works prefect.
Now I'm looking for a solution to login and logout by a php script.
In my site I have a login page. In that page I set 'PHP_AUTH_USER' and '
PHP_AUTH_PW'. but when I try to open protected directory, user
authentication dialog appears.
How can I do this? What is my error?

-- 
Ali Asghar Torabi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.