javascript - FullCalendar Refresh issue with JSON php file -


i have issue fullcalendar , want when save through button call ajax , save changes database , refresh events.

so problem following: - php file contain events reading db events not displaying @ all.:( following json_event.php file

$driver_booking = q("select * booking vehicle_id = ".$_request['ch']);                 $array = array();                 foreach($driver_booking $bookings) {                     $driver = getrow("driver", $bookings['driver_id']);                     //return date_time only....                     $date_from = date("y-m-d",$bookings['datetime_from']);                     $time_from = date("h:i:s",$bookings['datetime_from']);                     //return date_time only.....                     $date_to = date("y-m-d",$bookings['datetime_to']);                     $time_to = date("h:i:s",$bookings['datetime_to']);                     if($bookings['days_option'] == 1) {                         $start = $date_from."t".$time_from;                         $array[] = array('id' => $bookings['id'], 'title' => $driver['name'], 'start' => $start, 'allday' => false);                     } else {                         $start = $date_from."t".$time_from;                         $end = $date_to."t".$time_to;                         $array[] = array('id' => $bookings['id'], 'title' => $driver['name'], 'start' => $start, 'end' => $end, 'allday' => false);                     }                  }                  $json = json_encode($array); 

now, main file call json file: adding 1 line:

 eventsources: [      // event source     {         url: 'json_event.php', // use `url` property      }      // other sources...  ], 

so tell me doing wrong here specially json file wrote correct or missing.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -