Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

JSON response validated ok, but receive Invalid JSON response.

$
0
0

https://drei.sieben4zehn5.de/minify/serverSideTest/**:
**Debugger code (debug.datatables.net)
: https://debug.datatables.net/anutib
Error messages shown: DataTables warning: table id=example - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
Description of problem:

JSON response validated online ok, but receive Invalid JSON response message, this is my html

<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>Title</title>



<link href="../../css/bootstrap-5.0.2-dist/css/bootstrap.css" rel="stylesheet">

<link rel="stylesheet" type="text/css" href="../ext_assets/DataTables/datatables.css"/>


</head>
<body>

arbeitgeber position
arbeitgeber position
$('#example').dataTable( { "processing": true, "serverSide": true, "ajax": { "url": "server_processing.php", "dataType": "jsonp" } } );

</body>
</html>

and this the server-side script:

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

// DB table to use
$table = 'minify';

// Table's primary key
$primaryKey = 'id';

$columns = array(
array( 'db' => 'arbeitgeber', 'dt' => 0 ),
array( 'db' => 'position', 'dt' => 1 )
);

// SQL server connection information
$sql_details = array(
'user' => 'aer_talea',
'pass' => 'z&5T94jp',
'db' => 'web11573_talea-advisory',
'host' => 'localhost:3306'
);

require( 'ssp.class.php' );

echo json_encode(
SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
);

thanks in advance
armin


Viewing all articles
Browse latest Browse all 2364

Trending Articles