<?php
session_start();
include('../config/database.php');	
$repoArray = explode(',',$_POST['questionAllId']);		
$questionAllId = $_POST['questionAllId'];	
if(!empty($questionAllId))
{					
	$sqlProduct = mysqli_query($cn,"update `tbl_sh` SET `status`=1 where `id` IN($questionAllId)");	
	if($sqlProduct)
	{				
		$arr    = array("status"=>1, 'successMsg'=>count($repoArray)." Record Status Update SuccessFully");		
		$_SESSION['successMsg'] = count($repoArray)." Record Status Update SuccessFully.";
		echo json_encode($arr);	
	}
	else
	{
		$arr    = array("status"=>2, 'errorMsg'=>"Status Not Update Try Again.");		
		$_SESSION['errorMsg'] = "Record Status Update SuccessFully.";
		echo json_encode($arr);
	}
}
else
{
	$arr    = array("status"=>2, 'errorMsg'=>"Atleast select One Record.");		
	$_SESSION['errorMsg'] = "Atleast select One Record.";
	echo json_encode($arr);
}		
?>