<?php 
require_once 'config.php';
$error=false;
$errors=array();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
   
  
	 $json = file_get_contents('php://input');

// Converts it into a PHP object
$data = json_decode($json);
 
   
   //$user_id=$data->user_id;
   //$group_id=$data->group_id;
   $user_id=$_POST['user_id'];
   $group_id=$_POST['group_id'];
  
   $groups=mysqli_query($con,"UPDATE popupgroup_scan SET is_popup_show=1  WHERE user_id=".$user_id." AND  popup_id=".$group_id." ");
   	
		
		if($groups){
			
			$errors['success']=true;						
			$errors['message']='Update Successfully';
		}else{
			$errors['success']=false;
			$errors['message']="Something went wrong";
		}
				
	  
 
		
	
 	 
	 	echo json_encode($errors);
}