<?php
global $wpdb, $table_prefix;
if(!isset($wpdb)){
    require_once('../../../../wp-config.php');
    require_once('../../../../wp-includes/wp-db.php');
}
$tbname = "qg_itemx";
if(isset($_REQUEST["deleteitem"])){
   $id = intval($_REQUEST["deleteitem"]);
          
   if($id > 0){
      $sql31 = "UPDATE ".$wpdb->prefix.$tbname." SET visible='no' WHERE field_24='$id'";
      $wpdb->query($sql31); 
   }
}
?>