-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJ2M3.php
29 lines (26 loc) · 812 Bytes
/
J2M3.php
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
<?php
require 'connection.php';
$sql = "UPDATE score_rencontre SET J2M3=J2M3+1;";
$resultset = $connexion->prepare($sql);
$resultset->execute();
$sql = "SELECT J2M3 FROM score_rencontre;";
$resultset = $connexion->prepare($sql);
$resultset->execute();
$row = $resultset->fetch(PDO::FETCH_ASSOC);
if($row["J2M3"] == 3){
$sql = "UPDATE info_scoreboard SET ScoreE2=ScoreE2+1;";
$resultset = $connexion->prepare($sql);
$resultset->execute();
}
else if($row["J2M3"] > 3){
$sql = "UPDATE info_scoreboard SET ScoreE2=ScoreE2-1;";
$resultset = $connexion->prepare($sql);
$resultset->execute();
$sql = "UPDATE score_rencontre SET J2M3=0;";
$resultset = $connexion->prepare($sql);
$resultset->execute();
}
$connexion=null;
session_start();
header('Location: direction_portable.php');
?>