每当我得到正确的'hwid'时,我只是想向页面显示一些内容,但无论hwid是否在数据库中,它仍然显示为0.任何帮助?
[...]
else if($action == "dl")
{
$query = $con->query("SELECT * FROM `users` WHERE hwid = '$hwid'");
$cnt = $query->num_rows;
if($cnt == 1)
{
$logged = 1;
}
else if ($cnt == 0)
{
$logged = 0;
}
else
{
$logged = 0;
}
if ($logged == 1)
{
echo 'yep';
} else {
echo '0';
}
}