<?php
$servername = "db02.noc24online.net"; 
$username = "gyxbqlbq_singra_20202";  
$password = "singra2020";  
$dbname = "gyxbqlbq_amader_singra";
 $conn = mysqli_connect($servername, $username, $password, $dbname);
 $catagory= $_POST["catagoryKey"];
 mysqli_set_charset($conn,'utf8');
$sqlCheckUser = "SELECT * FROM `data`WHERE code = '$catagory'"; 
$run1 = mysqli_query($conn, $sqlCheckUser);
 
while ($datas1=mysqli_fetch_assoc($run1)) {
   
  $item[]=$datas1;
    $jsonEncode=json_encode(array('contents'=>$item));

}

echo $jsonEncode;
 
  
?>