Getting checkboxes values in DataTables with php

Getting checkboxes values in DataTables with php

geobotsargeobotsar Posts: 1Questions: 0Answers: 0
edited August 2011 in General
Hi, i have a table with several rows and columns. The first column of each row includes a checkbox.
The name of each checkbox is set to name="selectFiles[]" in order to be able to get the values of the checked checkboxes when i submit the form and get the values with php.
This works fine if a have a normal html table, but when i use a DataTable instead, and submit the form, the returned array of checked checkboxes is always empty in php.

This is the code for the table:
[code]<?php do { ?>



<?php echo $row_getFiles['fileTitle']; ?>
.......

<?php } while ($row_getFiles = mysql_fetch_assoc($getFiles)); ?> [/code]


and this is how i get the checked values on form submit, with php:
[code]if(array_key_exists('go',$_POST))
{
$selectedFiles=$_POST['selectFiles'];
$total=count($selectedFiles);
if($total!=0)
{
foreach($selectedFiles as $value)
{
do something here...
}
}
}[/code]

Any help would be greatly appreciated
Thanks
George
This discussion has been closed.