Created
July 12, 2016 16:02
-
-
Save websmith/d8cf5c1ab7094a464c5653181f9305d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!$conn) { | |
die("Connection failed: " . mysqli_connect_error()); | |
} | |
else { | |
$sql = "SELECT `Event_ID`, `Event_Name` FROM `Events_Catalog`"; | |
$result = mysqli_query($conn, $sql); | |
if (mysqli_num_rows($result) > 0) { | |
// output data of each row | |
while($row = mysqli_fetch_assoc($result)) { | |
$Event_ID = $row['Event_ID']; | |
echo "<li><a href='event.php?id=".$Event_ID."'>" . $row['Event_Name'] . "</a></li>"; | |
} | |
} | |
else { | |
echo "<h3>Sorry, currently there are no scheduled events.</h3>"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment