I followed this tutorial [http://www.zend.com/zend/tut/authentication.php], and I would like to know how I could get the username and password input to occur from a form, insted of a authentication dialog box. Any help would be appreciated.
if(!$PHP_AUTH_USER) { header("WWW-authenticate: Basic realm=\"Login\""); header("HTTP/1.0 401 Unauthorized"); echo "Invalid."; } else { echo "My Username: $PHP_AUTH_USER <BR>\n"; echo "My Password: $PHP_AUTH_PW <BR>\n"; }
<form action='login.php' method=post> Username: <input type='text' name='PHP_USER'><BR> Password: <input type='password' name='PHP_PW'><BR> </form>
The username would be $PHP_USER and password would be $PHP_PW
Or just set a cookie.