-
Notifications
You must be signed in to change notification settings - Fork 0
/
signUpShowingForm.php
89 lines (70 loc) · 1.83 KB
/
signUpShowingForm.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
<?php
//connect to database
require_once('database.php');
//pull showingID from the form
$showingID = filter_input(INPUT_POST, 'showingID');
echo $showingID;
//get showing info
$query = 'SELECT * FROM showings
INNER JOIN units
ON showings.unitID = units.unitID
WHERE showingID = :showingID';
$statement1 = $db->prepare($query);
$statement1->bindValue(':showingID', $showingID);
$statement1->execute();
$selectedShowing = $statement1->fetch();
$statement1->closeCursor();
?>
<!doctype html>
<html>
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/main.css" media="screen" />
</head>
<body>
<div class="wrapper">
<nav>
<?php include_once('navigation.php')?>
</nav>
<header>
</header>
<main>
<h1><?php echo $selectedShowing['address'] ?></h1>
<h1><?php echo $selectedShowing['date'] ?></h1>
<h1><?php echo $selectedShowing['time'] ?></h1>
<h2>Sign Up for the Showing</h2>
<form action="signUpShowing.php" method="post">
<table>
<tr>
<td>First Name</td>
<td><input type="text" name="firstName"></td>
</tr>
<tr>
<td>MI</td>
<td><input type="text" name="middleInitial"></td>
</tr>
<tr>
<td><label>Last Name</label></td>
<td><input type="text" name="lastName"></td>
</tr>
<tr>
<td>Phone Number</td>
<td><input type="tel" name="phoneNumber"></td>
</tr>
<tr>
<td>Email</td>
<td><input type="email" name="email"></td>
</tr>
</table>
<input type="hidden" name="showingID" value="<?php echo $showingID; ?>">
<input type="submit" value="Submit">
</form>
</main>
<div style="clear: both;"> </div>
<footer>
<?php include_once('footer.php')?>
</footer>
</div>
</body>
</html>