Hi all,
I'm creating a very basic authentication script, using the WWW-Authenticate header method. Since there are only a few users involved and I don't want to setup an entire database for just these few users, I have chosen to put the username/password in arrays, like this:
$users = array("john", "nick", "jason", "eddie", "linda", "christine");
$passwords = array("johnnyboy", "test", "bla", "somepass", "hello", "hi");
How do I make PHP check if $SERVER['PHP_AUTH_USER'] and $SERVER['PHP_AUTH_PW'] are entered with the correct combinations ? So, like john can only login with password "johnnyboy" and not with any of the passwords as defined under $passwords ?
I know there must be a way, but I'm just too tired at the moment to figure out a creative way to solve this.
Thanks in advance.