<?php 
require_once ("../var/res.php");
   
  if(!empty($_POST['delids'])){
    
      foreach($_POST['delids'] as $i){
        try{
    
        $checkBco = $conn->prepare("SELECT * FROM `tbl_boqs` WHERE `boq_id`=$i AND stsboq=4");
    	$checkBco->execute();
    	if($checkBco->rowCount() >0){
    	$trash = $db->prepare("UPDATE `tbl_boqs` SET stsboq=7 WHERE `boq_id`=$i");
    	$trash->execute();
    	$msge="Data Removed";
    	}
               
        }catch(PDOException $e){
    	echo $e->getMessage();
    	}
        
    } //for each
    
  } // Del
  
?>