Uname : Linux V-ShopU01 4.18.0-348.20.1.el8_5.x86_64 #1 SMP Thu Mar 10 20:59:28 UTC 2022 x86_64
Server : Apache/2.4.37 (rocky) OpenSSL/1.1.1k
Whoami : apache
Safe Mode : OFF
DOCUMENT ROOT : /var/www/html/site_shopudiet
Disable Function :
Path : /var/www/html/site_shopudiet/admin/

Server IP : 65.20.74.164 Client IP : 18.189.171.52
Current File : /var/www/html/site_shopudiet/admin/add_top_offer.php
<?php
include 'dbconnect.php';
$home_id=$_POST['product'];
$limit = "SELECT * FROM product WHERE top='1'";
$mysqliStatus = $conn->query($limit);
if(mysqli_num_rows($mysqliStatus) >= 15) {
    echo "<script> alert('Limit Exceed'); window.location.href='top_offer_list.php'; </script>";
} else {
$sql = "UPDATE product SET top='1' WHERE id=$home_id"; 
if ($conn->query($sql) === TRUE)
         {
              echo "<script> alert('Successfull'); window.location.href='top_offer_list.php'; </script>";

        } 
      else 
         {
           echo "Error: " . $sql . "<br>" . $conn->error;
         }
}
?>