PHP + Apache Authentification

From: Date: Wed, 10 Oct 2001 16:09:20 +0000
Subject: PHP + Apache Authentification
Groups: php.general 
Request: Send a blank email to php-general+get-70701@lists.php.net to get a copy of this message
Hi all, I have a site at http://www.somehost.com with an index.html page as a starting point. This page have a form with a input text for login and a password input for password, when I click on the 'submit' button then I do a POST for a /secure/check_user.php file which look up this info in a mysql database, if the login and password aren't valid I do a header('HTTP/1.0 401 Unauthorized') call and a box appear asking for login and passowrd, but if the login and password are valid, then I do a header('Location: main.php') call to access the main menu. /secure/ is a .htaccess protected directory but when I get this page a box prompt me for a login and password values, so my cuestion is, how can pass the values of the text boxes of index.html directly to Apache so Apache don't ask me for them? I need a secure directory with apache so unauthorized people can't reach files directly like images o plain text files. And a second question: after I get access to /secure/ I want to enable a 'Logout' button, because if I return to the index.html page and I put another login and password, even an invalid one I still login as the first person. Thank's for your help. -- Mauricio Téllez Jiménez Seguimiento Técnico EDUMEXICO edumexico@speedy.coacade.uv.mx edumexico@speedy.uv.mx edumexico@terra.com.mx Zamora No. 25, Col. Centro C.P. 91000, Xalapa, Ver. Tel. 52(28)17-86-87, 17-73-80 Fax. 52(28)18-64-13

« previous php.general (#70701) next »