-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvalidateMath.php
More file actions
79 lines (71 loc) · 1.33 KB
/
validateMath.php
File metadata and controls
79 lines (71 loc) · 1.33 KB
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
<!doctype html>
<html>
<style>
body {
background-image: url("math4.jpg");
background-size: 1500px 800px;
background-repeat: no-repeat;
font-size: 20px;
color: yellow; }
h1{
color: DarkBlue;
}
.class1
{
font-size: 100px;
text-align: center;
font-style: italic;
font-weight: bold;
color: white;
}
h1{
font-size: 100px;
text-align: center;
font-style: italic;
font-weight: bold;
color: white;
}
.class2
{
text-align: center;
font-size: 30px;
font-style: italic;
font-weight: bold;
color: Blue;
}
a:link, a:visited {
background-color: crimson;
color: white;
padding: 14px 25px;
text-align: center;
text-decoration: none;
display: inline-block;
}
a:hover, a:active {
background-color: red;
}
</style>
<body>
<p class= "class1"> Congratulations!</p>
<?php
$choice1=$_POST{'choice1'};
$choice2=$_POST{'choice2'};
$choice3=$_POST{'choice3'};
$choice4=$_POST{'choice4'};
$choice5=$_POST{'choice5'};
$correct=0;
if ($choice1=="a")
$correct=$correct+1;
if ($choice2=="b")
$correct=$correct+1;
if ($choice3=="a")
$correct=$correct+1;
if ($choice4=="b")
$correct=$correct+1;
if ($choice5=="b")
$correct=$correct+1;
echo"<h1> Your score is $correct/5</h1>";
echo "<a href= 'http://localhost/agile2/welcome.php'> Back to Homepage </a>";
?>
</body>
</html>