-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmit.php
89 lines (71 loc) · 1.72 KB
/
submit.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
85
86
87
88
89
<!DOCTYPE html>
<html>
<head>
<style>
#example1 {
background-color:rgb(137, 164, 250);
background-position: right bottom, left top;
background-repeat: no-repeat, repeat;
padding: 15px;
border-radius: 15px;
width: 620px;
height: "auto"px;
box-shadow: 0 5px 15px 0 rgba(10, 36, 19, 0.2), 0 2px 15px 0 rgba(0, 0, 0, 0.30);
border-style: solid;
border-width: 5px;
}
body {
color: white;
}
h1 {
color: rgb(255, 255, 255);
}
</style>
</head>
<body>
<center>
<div id="example1">
<h1> GRADE CHECKER BY XAAKKO </h1>
<?php
//underphp!!
echo "YOUR MARKS ARE" . "</h2>";
$maths=$_GET ['maths'];
$english=$_GET ['english'];
$dhivehi=$_GET ['dhivehi'];
$chemistry=$_GET ['chemistry'];
$physics=$_GET ['physics'];
$total = $physics + $dhivehi + $english + $maths + $chemistry;
$average = $total /5;
//headings h3 h2 h1 only
echo "<h3>Chemistry: $chemistry </h3>";
echo "<h3>Dhivehi: $dhivehi </h3>";
echo "<h3>English: $english </h3>";
echo "<h3>Maths: $maths </h3>";
echo "<h3>physics: $physics </h3>";
// total and stuff
echo "</h2>Total : $total </h2><br><br>";
echo "</h2>Average : $average </h2><br><br>";
echo "</h2>Your grade is: </h2>";
if ( ( $average >= 85) && $average <=100) {
echo "A";
}
if ( ($average >=70) && $average <= 84) {
echo "B";
}
if ( ($average >=65) && $average <= 69) {
echo "C";
}
if ( ($average >=50) && $average <= 64) {
echo "D";
}
if ( ($average >= 30) && $average <= 49) {
echo "E";
}
if ($average <=30) {
echo "YOU GOT A 'F' Try harder!!";
}
?>
</div>
</center>
</body>
</html>