-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathresults.php
More file actions
67 lines (63 loc) · 1.92 KB
/
results.php
File metadata and controls
67 lines (63 loc) · 1.92 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHP Forms</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
</head>
<body>
<?php
switch ($_POST["movies"]) {
case "horror":
$comment =
"You're a horror movie lover.";
break;
case "comedy":
$comment =
"You're a comedy movie lover.";
break;
case "romantic":
$comment =
"You're a romantic movie lover.";
break;
case "science_fiction":
$comment = "You're a science fiction movie lover.";
break;
case "suspense":
$comment = "You're a suspense movie lover.";
break;
case "indie":
$comment = "You're an indie movie lover.";
break;
case "chick_flick":
$comment = "You're a chick flick movie lover.";
break;
case "action":
$comment = "You're an action movie lover.";
break;
case "none":
$comment = "You have horrible taste.";
break;
default:
$comment = "You’re a
<?php echo $movies; ?> movie lover.";
}
?>
<?php
// Set variables
$nickname = htmlspecialchars($_POST["nickname"]);
$first_and_last_name = htmlspecialchars($_POST["first_and_last_name"]);
//$movies = htmlspecialchars($_POST["movies"]);
?>
<div class="container py-5 my-5">
<pre>
</pre>
<h1>Sup, <?php echo $nickname; ?></h1>
<?php if($_POST["movies"] != null): ?>
<p class="lead"><?php echo $comment; ?></p>
<?php else: ?>
<p>Enter a movie.</p>
<?php endif; ?>
</div>
</body>
</html>