Hi everyone,
I am trying to input values from my database to a dhtml grid. It seemed to me that the easiest way to achieve this might be to get the variables in php form and then try and get the resulting php into the table (I also want to be able to update the database later when the user changes the dhtml fields).
I found this example:http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:data_loading and thought using a json file might be the easiest way to do this, I guess I could write php that makes a string along the same lines as this code:
var js={
rows:[
{ id:1001,
data:[
“100”,
“A Time to Kill”,
“John Grisham”,
“12.99”,
“1”,
“05/01/1998”] },
{ id:1002,
data:[
“1000”,
“Blood and Smoke”,
“Stephen King”,
“0”,
“1”,
“01/01/2000”] }
]}
and then try and convert this to a javascript variable? but then I am left with a string that I will need to convert to json… seems a bit fiddley.
viewtopic.php?f=21&t=16279 seems to be along the same lines but I am confused as to how I can use this with my own php variables. It seems that given the popualrity of php and mySQL there must be an easier way of doing all this that I am missing, so I thought I would ask here, any help would be very much appreciated, thanks for your time,