Hey
I've created a .htaccess file as below:
AuthType Basic
AuthName "Homepage Login"
AuthUserFile /path-to-htpasswd/.htpasswd
require valid-user
& the .htpasswd file as below:
username1:pass
username2:pass
The files work perfectly at passwording the directory. The next file in the directory is then: index.php . I'd like to know how to retrieve the variables set for the username & the password from the .htaccess file. So I can do something like the below:
index.php
<body>
<?php
include "include.php";
accountcheck($username, password)
echo "Welcome $username, you are now logged into your account: $account[name]!";
?>
That's just a small example but I am trying to retrieve the variables that you input into the password box. Can anyone please help?