Home › Forums › Back End › [Solved] User Authentication (without db) › Re: [Solved] User Authentication (without db)
July 13, 2010 at 1:28 pm
#79715
Member
Nevermind, I got it.
This is the final code I came up with:
Code:
$authentication = $_POST[’authentication’];
$user_authentication = array(
‘users’ => array(
‘dyllon’ => ‘foo’,
‘robb’ => ‘bar’
)
);
$user_authentication = array(
‘users’ => array(
‘dyllon’ => ‘foo’,
‘robb’ => ‘bar’
)
);
foreach($user_authentication as $key){
foreach($key as $key => $val){
if($authentication == $val){
echo $key;
}
}
}