Here, the data is taken out and placed in $rows. If the if statement is used to judge, it can only be verified once, that is, only the first data in the $rows array can be verified. In this case, if the user name we enter is not the first piece of data, the verification will never be successful.
If $rows is an array, use the array search command. If $rows is a json string, use $rows = json_decode($rows,true);