I would like to integrate the jQuery fullcalendar into my PHP website, but I don\'t know how to handle the event and how to use the JSON data from MySQL.
Any advice wou
I had the same problem and just found out how to make it work. Here is the code that you should use in your php file:
$query = "select * from events where accountNo = '$accountNo'";
$res = mysql_query($query) or die(mysql_error());
$events = array();
while ($row = mysql_fetch_assoc($res)) {
$start = "2010-01-08T08:30"";//Here you have to format data from DB like this.
$end = "2010-01-08T08:30";//This format works fine
$title = $row['firstName']." ".$row['lastName'];
$eventsArray['id'] = $row['id'];
$eventsArray['title'] = $title;
$eventsArray['start'] = $start;
$eventsArray['end'] = $end;
$eventsArray['allDay'] = "";
$events[] = $eventsArray;
}
echo json_encode($events);
I hope it helps :).