<?php
include("connection.php");
$uid=$_POST['id'];
$sql = "SELECT * FROM  new_order WHERE user_id='$uid'";
$res=mysqli_query($conn,$sql);
while($row=mysqli_fetch_array($res))
{
   $name=$row['name'];
   $address=$row['address'];
   $city= $row['city'];
   $zipcode=$row['zipcode'];
   $p_name=$row['product_name'];
   $origan=$row['origin'];
   
   $state=$row['state'];
   $count=$row['country'];
   $qty=$row['quantity'];
}
echo json_encode(array(
    "name"=>$name,
    "address"=>$address,
    "city"=>$city,
    "zipcode"=>$zipcode,
    "p_name"=>$p_name,
    "origan"=>$origan,
    "state"=>$state,
    "count"=>$count,
    "qty"=>$qty,

));


?>
 