Server side paging not working

Server side paging not working

MattiaMattia Posts: 1Questions: 1Answers: 0

I'm trying to display some data but the pagination is not working...

This is how i create the table:

$('#tabella_prodotti').DataTable({
  "paging": true,
  "processing": true,
  "serverSide": true,
  "ajax": {
    "url" :"/admin/get_prodotti.php",
    "data":{
        //custom data
        "ric_lib": '<?echo $_REQUEST["ric_lib"];?>' ,
    "macchina": '<?echo $macchina_tot;?>',
    "vendor": '<?echo $vendor;?>',
    "categoria": '<?echo $cat_merc;?>',
    "id_gruppo_confronto": '<?echo $id_gruppo_confronto;?>'
     }
   }
});

and this is the php part

/* Paging */
    $sLimit = "";
    
    echo $_GET['iDisplayStart']."<br>";
    echo $_GET['iDisplayLength']."<br>";
    die;
    
    if ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )
    {
        $sLimit = "LIMIT ".mysql_real_escape_string( $_GET['iDisplayStart'] ).", ".
            mysql_real_escape_string( $_GET['iDisplayLength'] );
    }

As you can see i tried so see which values are in those variables, but they're empty.. how is this possible?

This discussion has been closed.