-
Notifications
You must be signed in to change notification settings - Fork 0
/
validate.php
84 lines (84 loc) · 1.87 KB
/
validate.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
require 'quizz.php';
$color= '';
if(isset($_POST['choice'])) {
$bonneReponse = 'Russie';
if($bonneReponse == $_POST['choice']){
$color="green";
echo 'Bonne reponse';
}else{
$color='red';
echo 'mauvaise reponse';
}
}
if(isset($_POST['choice2'])) {
$bonneReponse = 'Vrai';
if($bonneReponse == $_POST['choice2']){
$color="green";
echo 'Bonne reponse';
}else{
$color='red';
echo 'mauvaise reponse';
}
}
if(isset($_POST['choice3'])) {
$bonneReponse = 'Faux';
if($bonneReponse == $_POST['choice3']){
$color="green";
echo 'Bonne reponse';
}else{
$color='red';
echo 'mauvaise reponse';
}
}
if(isset($_POST['choice4'])) {
$bonneReponse = '1667';
if($bonneReponse == $_POST['choice4']){
$color="green";
echo 'Bonne reponse';
}else{
$color='red';
echo 'mauvaise reponse';
}
}
if(isset($_POST['choice5'])) {
$bonneReponse = '468m';
if($bonneReponse == $_POST['choice5']){
$color="green";
echo 'Bonne reponse';
}else{
$color='red';
echo 'mauvaise reponse';
}
}
if(isset($_POST['choice6'])) {
$bonneReponse = 'Reykjavik';
if($bonneReponse == $_POST['choice6']){
$color="green";
echo 'Bonne reponse';
}else{
$color='red';
echo 'mauvaise reponse';
}
}
if(isset($_POST['choice7'])) {
$bonneReponse = 'Nairobi';
if($bonneReponse == $_POST['choice7']){
$color="green";
echo 'Bonne reponse';
}else{
$color='red';
echo 'mauvaise reponse';
}
}
if(isset($_POST['choice8'])) {
$bonneReponse = 'Aéroport';
if($bonneReponse == $_POST['choice8']){
$color="green";
echo 'Bonne reponse';
}else{
$color='red';
echo 'mauvaise reponse';
}
}
?>