<?php 
include("db_config.php"); 
if($_SERVER['REQUEST_METHOD']=='POST'){
     $user_id = $_POST['user_id'];
	 $query="select * from addto_cart where invoice_id='0' and user_id='$user_id'";
	 $result = mysqli_query($conn, $query);
	
	if(mysqli_num_rows($result) > 0) {
		while($row[] = mysqli_fetch_assoc($result)) {
 
		 $tem = $row;

		 }
	  $response['data']=$tem;
	  $response['status']=1;
	}
	else {
		//$json =  json_encode(array("status" => 0, "msg" => "data Not Found!"));
		$response['status']=0;
	}
	echo json_encode($response);
	mysqli_close($conn);
}