-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_information.php
More file actions
33 lines (27 loc) · 911 Bytes
/
get_information.php
File metadata and controls
33 lines (27 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
require_once '/home/u332930526/public_html/android_api/include/DB_Functions.php';
$db = new DB_Functions();
// json response array
$response = array("error" => FALSE);
if (isset($_POST['uid_user'])) {
$uid_user = $_POST['uid_user'];
// get the user by uid_user and limit
$user = $db->getAllUser($uid_user, $limit);
if ($user != false) {
// use is found
$response["error"] = FALSE;
$response["user"] = $user;
echo json_encode($response);
} else {
// user is not found with the credentials
$response["error"] = TRUE;
$response["error_msg"] = "Login credentials are wrong. Please try again!";
echo json_encode($response);
}
} else {
// required post params is missing
$response["error"] = TRUE;
$response["error_msg"] = "Required parameters uid_user is missing!";
echo json_encode($response);
}
?>