Hello,
The following code snippet, traveses (2) arrays, checking for a match. I understand the first loop through ($usernames), but where is the interation called on ($passwords)?
// Now we loop through each entry in our arrays looking for a valid match
for ($count = 0; $count < count($usernames) && $matchFound == false; $count++) {
// If username and password matches entry...
if ($username == $usernames[$count] && $password == $passwords[$count]) {
// Get the user's message and indicate we've found a match
$message = $messages[$count];
$matchFound = true;
}
}