Skip to content

Instantly share code, notes, and snippets.

@websmith
Created July 6, 2016 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save websmith/97db71a5734848761dadbdc2e150386a to your computer and use it in GitHub Desktop.
Save websmith/97db71a5734848761dadbdc2e150386a to your computer and use it in GitHub Desktop.
<div role="main" class="ui-content">
<?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)) {
echo "Event ID is: <b>" . $row["Event_ID"] . "</b><br />
Event name is: <b>" . $row["Event_Name"] . "</b><br /><br />";
}
}
else {
echo "<h3>Sorry, currently there are no scheduled events.</h3>";
}
}
?>
<a href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back">Close</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment