Example #1
0
 function __construct()
 {
     @session_start();
     if (isset($_SESSION["userID"])) {
         $userID = $_SESSION["userID"];
         $dataBase = new Database();
         $userData["userProfile"] = $dataBase->getUserProfile($userID);
         if ($userData["userProfile"] != null) {
             $userData["userFriendsData"] = $dataBase->getUserFriends($userID);
             $userData["userMatchesData"] = $dataBase->getUserMatch($userID);
         }
     }
 }
Example #2
0
<?php

header('Access-Control-Allow-Origin: *');
header("Content-Type: text/json");
include_once "functions.php";
//session function are here
include_once "databse.php";
//put values in variables
$username = "******";
$password = "******";
$dataBase = new Database();
//inicialze the databse instance
echo json_encode($dataBase->getUserMatch(2));
Example #3
0
<?php

include_once "databse.php";
@session_start();
if (isset($_POST["userID"])) {
    $databse = new Database();
    echo json_encode($databse->getUserMatch($_POST["userID"]));
}