<?php include"../config/config.php";

if($_POST['type']=="dynamic_bulk_notifications"){
    
    $ids = implode(',', $_POST['ids']);
    $status=$_POST['status'];
    
    $statement = $pdo->prepare("UPDATE tbl_notifications SET status=$status WHERE id in (".$ids.")");
    $result=$statement->execute();
        if($result==1)
    	{
    	    $message='Success..';
    	    $error='1';
    	}
    	else
    	{
    	    $message='Failed..';
    	    $error='0';
    	}
    		$datas[] = array('message' => $message, 'error' => $error);                   
            echo $message;
    }

?>