如何在DataTables的服务器端脚本中将表作为变量传递?

I recently let DataTables do the sorting and pagination for me. My tables are loaded as an array:

    $table_fetch = $dbh->query("SELECT relname FROM pg_class, pg_namespace WHERE relnamespace = pg_namespace.oid AND nspname = 'schema' AND relkind = 'r'");
$tables = array();
while ($row_list = $table_fetch->fetch(PDO::FETCH_ASSOC))
{
    $tables[] = $row_list['relname'];
}

And they are shown to users as dropdown options:

<form action="<?php $_SERVER['PHP_SELF'] ?>" method="POST" id="form">
<select name="table" onchange="this.form.submit()">
<option>Select a Table</option>
    <?php
                    foreach ($tables as $table) {
                        echo "<option value='$table'>" . $table . " </option>";
                    }
                ?>
</select>
</form>

And table is passed as variable after submit

if(isset($_POST['table'])){
    $var_table = $_POST["table"];
    $query = $dbh->prepare("select * FROM schema.".$var_table."");

And then initiating DataTables like so:

<script>
$(document).ready(function(){
    $('#sortable').DataTable();

});
</script>

It's working fine and dandy until one table reached 11K+rows and DataTables fail to load it properly(it starts to load all items in one page, no sorting and pagination, but other tables are ok though). So I've read about DataTables' server-side scripting and wondering how to pass tables as variable and load items in the server_processing.php template they provided.