Invalid Data - DHTMLXGantt

Good Day! I’m trying to make an Interactive Gantt Chart using DHTMLXGantt however it doesn’t save to MYSQL Db. I followed the steps thoroughly in the Documentation, but it gives me an “Invalid Data” error. What seems to be the problem (Attached is the code)?

myGantt.html

[code]

How to Start with dhtmlxGantt
gantt.config.xml_date = "%Y-%m-%d %H:%i"; gantt.init("gantt_here"); gantt.load('data.php');
    var dp=new dataProcessor("data.php");   
    dp.init(gantt);
</script>
[/code]

data.php

[code]

<?php include ('codebase/connector/gantt_connector.php'); $res=mysql_connect("localhost","",""); mysql_select_db("gantt"); $gantt = new JSONGanttConnector($res); $gantt->render_links("gantt_links","id","source,target,type"); $gantt->render_table( "gantt_tasks", "id", "start_date,duration,text,progress,sortorder,parent" ); ?>[/code]

Hi,
try opening your data.php in browser and check what it returns.

The error you have can be triggered when server returns an empty response:
github.com/DHTMLX/gantt/blob/v3 … t.js#L4627
github.com/DHTMLX/gantt/blob/v3 … t.js#L4472

Probably some error happens on a backend, you may want to enable php error messaging to see whats happening stackoverflow.com/questions/8450 … ges-in-php