Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is part of my .js file. This defines a schema and a model to feed the table, and below is the relevant part that gets the info from the .php file:
- ...
- },
- batch: true,
- pageSize: 8,
- schema:
- {
- data: "data",
- total: function(response)
- {
- return $(response.data).length;
- },
- model:
- ...
- In the .php file i only have this:
- header("Content-type: application/json");
- $statement = $pdo->query("SELECT ... etc etc..
- $statement->execute();
- $result = $statement->fetchAll(PDO::FETCH_ASSOC);
- echo "{\"data\":" .json_encode($result). "}";
- If i use this code, the table returns results, but my problem is i need to feed the table and also send the var session...the reason why i need this is because itΒ΄s a clients table, and when you create a new table, it has to register the user that has login and thus inserting a new client.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement