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