Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [Solved] User Authentication (without db) Re: [Solved] User Authentication (without db)

#79715
Makeshift
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’
)
);

foreach($user_authentication as $key){
foreach($key as $key => $val){
if($authentication == $val){
echo $key;
}
}
}