如果此代码已被单击,我如何检查 PHP 以便我可以在 if 语句中使用它?
<form id="rating" action="index.php" method="post">
<a href="#" onclick="document.getElementById('rating').submit();">Rating</a>
</form>
因此,如果单击它,我想使用此查询:
if () {
$result = mysqli_query($con,"SELECT * FROM users WHERE `approved` = 1 ORDER BY `rating`");
}