File "getData.php"
Full path: /var/www/html/xenioo_api/getData.php
File
size: 718 B B
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php
error_reporting(E_ALL & ~E_NOTICE);
include_once('configuration.php');
$user_id = $_GET["user_id"];
//echo $user_id;
$query = 'SELECT * FROM DB_Clients WHERE ID = ' . $user_id . ';';
//echo "<br>" . $query;
$result = $DBcon->query($query);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
$myObj->client_id = $row['Client ID'];
$myObj->Name = $row['Name'];
$myObj->Mobile = $row['Mobile Phone'];
$myObj->Phone = $row['Phone'];
$myObj->Email = $row['Email'];
$myObj->A_Status = $row['Account Status'];
$myObj->Debt = $row['Debt'];
$myObj->S_Status = $row['Service Status'];
$myJSON = json_encode($myObj);
echo $myJSON;
}
}
?>