Displaying information
Open up your index.php
file now, along with the db.php
file. We will be making changes to these files in order to make the code easier to manage and maintain. All the events data that we have created and are able to fetch from the database table is to be displayed in the Events popup, which till this moment has been displaying the Sorry, currently there are no scheduled events. message, as shown in the following screenshot:
To do this, we will be modifying the following piece of code on all the pages that we have created, which are Home, About Us, Facilities, and Catering:
<div role="main" class="ui-content"> <h3 class="ui-title">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>
Instead of displaying this static message, we will now show some dynamic data here. In order to display a list of events, we will make use of...