PHP/Perl/Datatables

PHP/Perl/Datatables

madesignsmadesigns Posts: 1Questions: 0Answers: 0
edited October 2013 in DataTables 1.9
I have a webpage where are user will paste a 336 comma separated value. Once the user clicks submit I call a Perl script that will parse the data and gather the item number/title/value. It pushes all this data into an array. What I having issues with is taking this data and presenting a DataTable. Because with this I can give the user many more options such as saving as csv, print and so on.

Here is an example of the data......

here is what the user will insert in a field in a html form.....

dataset,dataset,dataset,dataset,,dataset,dataset,dataset,dataset,dataset,dataset,dataset,dataset,dataset,dataset,,,,,,,

the user will click submit

this will call a Perl script that gathers this data about what was submitted....

Array ( [0] => 1 : Name : dataset [1] => 2 : Name : dataset [2] => 3 : Name : dataset [3] => 4 : Name : dataset [4] => 5 : dataset : [5] => 6 : Name : dataset [6] => 7 : Name : dataset [7] => 8 : Name : dataset [8] => 9 : Name : dataset)

I just cant figure out how to send this array back to datatables for presentation.

Replies

  • jfha73jfha73 Posts: 2Questions: 0Answers: 0
    Hey guys, for some reason I'm getting this:

    [code]PHP Fatal error: Cannot redeclare class DataTables\\Database\\DriverMysqlQuery in /path/to/Database/Driver/Query.php on line 108[/code]

    I'm using PHP 5.5.4 on an OpenSUSE Linux.

    What can I do?

    Thanks
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    @madesigns - I'm afraid I'm not much of a perl expert - its been years since I've used it in fact. How would you normally create a JSON string from a perl array - is there a module for that?

    @jfha73 - I'm not sure how your question relates to the question from made signs - can you open a new thread please. Also, I see your trial of Editor expired back in June - a license is required if you want to continue using it, so I can offer support for the software.

    Allan
This discussion has been closed.