-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrest.php
More file actions
28 lines (22 loc) · 751 Bytes
/
rest.php
File metadata and controls
28 lines (22 loc) · 751 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
<?php
header('Content-Type: application/json');
function json_authentification($id, $pseudo, $password, $favorite_team, $favorite_team_name, $tab_bets){
$retour ["idSupporter"] = $id;
$retour ["pseudo"] = $pseudo;
$retour ["password"] = $password;
$retour ["favoriteTeam"] = $favorite_team;
$retour ["favoriteTeamName"] = $favorite_team_name;
$retour ["tab_bets"] = $tab_bets;
echo json_encode($retour);
}
function json_bet($bets){
$retour ["tab_bets"] = $bets;
echo json_encode($retour);
}
function json_pourcent($pourcentHome, $pourcentAway, $nbParieurs){
$retour ["pourcentHome"] = $pourcentHome;
$retour ["pourcentAway"] = $pourcentAway;
$retour ["nbParieurs"] = $nbParieurs;
echo json_encode($retour);
}
?>