-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
47 lines (38 loc) · 972 Bytes
/
index.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
<?php
include 'functions.inc.php';
include 'doctype.html';
if($_SERVER['REQUEST_METHOD'] == 'POST'){
if (all_pass($_POST)){
$k = htmlentities($_POST['number_over_20']);
$n = htmlentities($_POST['one2three']);
include 'output.php';
switch($n){
case 1:
include 'case1.php';
break;
case 2:
include 'case2.php';
break;
case 3:
include 'case3.php';
break;
default: echo 'The number must be 1, 2 or 3.<br />Give the number again.';
break;
}
}
elseif (fail_20($_POST)){
$k = htmlentities($_POST['number_over_20']);
echo "You entered the number ".$k.".<br />";
echo "Please enter a number of 20 or higher.<br />";
}
elseif (fail_3($_POST)){
$n = htmlentities($_POST['one2three']);
echo "You entered the number ".$n.".<br />";
echo "Please a choose an option number being 1, 2, or 3.<br />";
}
}
else{
include 'input.html';
}
include 'footer.html';
?>