我正在为我们的Android登录系统学习php和mysql。我按照完全相同的PHP代码来测试数据库。请帮我弄清楚我的代码有什么问题。我仔细检查了一切,他的代码似乎正在运作。
<?php
require "connect.php";
$user_name = "claude28";
$user_password = "simplepassword";
$mysql_qry = "select * from user_data where username like '$user_name' and password like '$user_password';";
$result = mysqli_query($conn,$mysql_qry);
if(mysqli_num_rows($result)>0) {
echo "Log in Success";
}
else{
echo "Log in Unsuccessful";
}
?>