Tried to create a user validation process using status .
I created a condition like if user status is pending it should pull up a message if user status is deactiavated it should pull up any other message and when user status is active it should login though. I created the script but the problem is that when the script runs it checks the first condition and pull up the message it is not moving forward to check the other conditions
Here is my script
if(isset($_POST["login"])) {
$get_query = mysqli_query($connection, "SELECT * FROM users");
while($record1 = mysqli_fetch_assoc($get_query)) {
$status = $record1["status"];
}
if($status == "pending") {
$msg = "Your account has not been activated yet";
} elseif($status == "active") {
echo verify($connection);
} else {
$msg = "Sorry but your account has been deactivated
}
}