Your IP : 18.119.112.208


Current Path : /home/lentoinv/covisclubinternational.com/profile/
Upload File :
Current File : /home/lentoinv/covisclubinternational.com/profile/ajax.php

<?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);
}

?>