Hi there.
I’ve been trying to integrate Fullcalendar into my project.
I’ve added it with success, i can see it but it disappears when I try to connect it to a table in the database. I get header, sidebar, page title and nothing more.TABLE - events
Events (Id, title, start, end, allDay)PHP EVENT LIST - eventlist.php
"; } else { echo "Connection could not be established.
"; die( print_r( sqlsrv_errors(), true)); } $sql = "SELECT id, title, start, end FROM dbo.events"; $stmt=sqlsrv_query($conn, $sql); // Initializes a container array for all of the calendar events $jsonArray = array(); while($row = sqlsrv_fetch_array($stmt))) { $title = $row['title']; $start = $row['start']; $end = $row['end']; // Stores each database record to an array $buildjson = array('title' => "$title", 'start' => $start->format('Y-m-d H:i:s'), 'end' => $end->format('Y-m-d H:i:s'), 'allday' => false); // Adds each array into the container array array_push($jsonArray, $buildjson); } // Output the json formatted data so that the jQuery call can read it echo json_encode($jsonArray); ``` ?>CUSTOM FILE - calendar.php <?php // include_once $RELATIVE_PATH . "header.php" ?>
<div id='calendar'></div>
</body>
Can anyone give me a hand on what am I doing wrong?
Thanks