how can i arrange an array data in phpp so that it can match 2 or more values?
EX:
users.php
$USERS["username1"] = "password1";
direct.php
include("users.php");
$user = $_POST['user'];
$pass = $_POST['pass'];
if ($USERS[$user]==$pass) {
echo "welcome";
}
so in the $USERS array the value will satify the if statement if the user inputs
“username1” and “passsword1”
what i want to do is allow the “username1” to be paired with other values
$USERS["username1"] = "password1" , "password3" , "password109";
even if the user inputs any of these 3
"password1" , "password3" , "password109"
it will satisfy the if statement is there anyway to do this?
I guess what you need is in_array()