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.188.96.232
Current File : /var/www/html/site_shopudiet/admin/delete_cat_sup.php
<?php
include 'dbconnect.php';
$home_id=$_REQUEST['id'];
$url = $_SERVER['HTTP_REFERER'];
$id1 = $_REQUEST['id1'];
$s = mysqli_query($conn,"SELECT * FROM super_category WHERE id='$home_id'");
while($rw = mysqli_fetch_array($s))
{
    $array = $rw['category_id'];
}
$res = explode(',',$array);
$key = array_search($id1, $res);
array_splice($res, $key, 1);
$result = implode(',',$res);
$sql = mysqli_query($conn,"UPDATE super_category SET category_id='$result' WHERE id='$home_id'");
$sql1 = "DELETE FROM super_vs_category WHERE category_id='$id1' AND super_id='$home_id'";
if(mysqli_query($conn,$sql1)) {
    header("Location:$url");
}
?>