Can't display data from database (I know it is really easy)

Hello, everyone, I’m trying to display some data that I have stored in a database. I can at least show the calendar and populate it with data from arrays (client-side); but when I try to use my database, tings go wrong and I can’t see any data. I think I’m making some mistakes, but I have checked my code, the documentation and guides, and can’t get the results I would like to.

This is my html:

<!DOCTYPE html>
<html>
<head>
   <title>How to start</title>
   <meta http-equiv="Content-type" content="text/html;" charset="utf-8">
   <script src="scheduler/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"> </script>
   <link rel="stylesheet" href="scheduler/dhtmlxscheduler.css" type="text/css" charset="utf-8">
   </head>

<style type="text/css" media="screen">
    html, body{
        margin:0px;
        padding:0px;
        height:100%;
        overflow:hidden;
    }   
</style>

<script type="text/javascript" charset="utf-8">
	function init() {
		scheduler.init('scheduler_here', new Date(),"month");
		scheduler.load("connector.php");
                var dp = new dataProcessor("connector.php");
                dp.init(scheduler);
	}   
</script>


<body onload="init();">
    <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>       
    <div class="dhx_cal_navline">
        <div class="dhx_cal_prev_button">&nbsp;</div>
        <div class="dhx_cal_next_button">&nbsp;</div>
        <div class="dhx_cal_today_button"></div>
        <div class="dhx_cal_date"></div>
        <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
        <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
        <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
    </div>
    <div class="dhx_cal_header"></div>
    <div class="dhx_cal_data"></div>       
</div>
</body>
</html>

This is my connector.php file:

<?php
	require("scheduler/connector/scheduler_connector.php");
	require("scheduler/connector/db_mysqli.php");
	$conn = new mysqli("127.0.0.1", "root", "root", "meddb");
	
	$scheduler = new SchedulerConnector($conn, "MySQLi");
        $scheduler->render_table("citas","id","start_date,end_date,text");
?>

The table in the database was created like this:

CREATE TABLE `citas` (
  `id` int(11) NOT NULL,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  `text` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

I’m sorry for asking such a thing, but I’m a little lost.
Thank you for your time
greetings from Mexico.

Hello,
try specifying xml_date, it is needed to parse date strings that are loaded from the server
docs.dhtmlx.com/scheduler/api__s … onfig.html

Thank you very much Aliaksandr, it is solved now. Could you tell me what do I have to do in order to create new events please? I know that the events that are in the database are being updated when I drag and drop those events. But when I create a new event it is displayed in red and is not saved into the database because when I reload the page it is not there.

Greetings

Hi,
make sure you’ve set an autoincrement to ‘id’ column, maybe this is the reason.
If it not helps - try to enable logging, the log may contain mysql error messages
docs.dhtmlx.com/connector__php__errors.html