-
Notifications
You must be signed in to change notification settings - Fork 0
/
browseFamilies.php
67 lines (59 loc) · 1.71 KB
/
browseFamilies.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
<?php
session_start();
include('header.php');
?>
<html>
<body>
<?php
include('siteNavigator.php');
?>
<!-- Page info goes below-->
<h1>View Families</h1>
<h2>Below is a list of all the families currently in the system.</h2>
<?php
// change password, browse giftcards, update account information, place an order
$query = "SELECT * FROM families ORDER BY parentLastName, parentFirstName";
$result = mysqli_query($db, $query);
echo "<table>\n<tr><th><h3 style=\"text-align:left\">First Name</h3></th>
<th><h3 style=\"text-align:left\">Last Name</h3></th>
<th><h3 style=\"text-align:left\">Year Joined</h3></th>
<th><h3 style=\"text-align:left\">Street</h3></th>
<th><h3 style=\"text-align:left\">City</h3></th>
<th><h3 style=\"text-align:left\">State</h3></th>
<th><h3 style=\"text-align:left\">Zip Code</h3></th>
<th><h3 style=\"text-align:left\">Home Phone</h3></th>
<th><h3 style=\"text-align:left\">Work Phone</h3></th>
<th><h3 style=\"text-align:left\">Cell Phone</h3></th>
</tr>\n\n";
while($row = mysqli_fetch_array($result))
{
$fname = $row['parentFirstName'];
$lname = $row['parentLastName'];
$yearJoined = $row['yearJoined'];
$streetAddress = $row['streetAddress'];
$city = $row['city'];
$state = $row['state'];
$zip = $row['zip'];
$homePhone = $row['homePhone'];
$workPhone = $row['workPhone'];
$cellPhone = $row['cellPhone'];
echo "<tr><td>$fname</td>
<td>$lname</td>
<td>$yearJoined</td>
<td>$streetAddress</td>
<td>$city</td>
<td>$state</td>
<td>$zip</td>
<td>$homePhone</td>
<td>$workPhone</td>
<td>$cellPhone</td>
</tr>\n";
}
echo "</table>\n";
?>
</div> <!-- Page info goes above-->
<?php
include('footer.php');
?>
</body>
</html>