-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
45 lines (33 loc) · 920 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
<?php
include("header.php");
?>
<HTML>
<BODY>
<br/>
<b><p><font size="6.5" face="Georgia" color="000066">R</font><font size="4.5" face="Georgia">estaurants currently in the database:</p></b></font>
<?php
$query = "SELECT restaurant_id, name FROM $table ORDER BY name";
$result = mysqli_query($db, $query)
or die("Error Querying Database");
while($row = mysqli_fetch_array($result)) {
$restaurant_id = $row['restaurant_id'];
$name = $row['name'];
$firstLetter = substr($name, 0, 1);
$theRest = substr($name, 1, strlen($name)-1);
echo "<li><i><a href=\"restaurantSearch.php?restaurant_id=$restaurant_id\"><font size=5 face=Georgia color=000066>$firstLetter</font><font size=4 face=Georgia color=CC6600>$theRest</a></i></li></font>";
//echo "<li>$name</li>";
}
?>
</BODY>
</HTML>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</center>
<?php
include("footer.php");
exit;
?>