Your IP : 3.12.147.12
<?php
include("lib/connect.inc.php");
if (isset($_GET['paySavings'])){
$request = $_GET['paySavings'];
$request = json_decode($request);
$sql = $db->query("SELECT * FROM contributedmoney
WHERE user_id = '$request->user' AND savings_id = '$request->savings'");
$row = $sql->fetch_object();
$response = array (
'data' => $row,
'count' => $sql->num_rows
);
echo json_encode($response);
}
if (isset($_GET['payDetails'])){
$request = $_GET['payDetails'];
$request = json_decode($request);
$sql = $db->query("SELECT * FROM contributedmoney
WHERE user_id = '$request->user' AND savings_id = '$request->savings'");
$array = array();
while ($row = $sql->fetch_object()){
array_push($array, $row);
}
$response = array (
'data' => $array,
'count' => $sql->num_rows
);
echo json_encode($response);
}