I have the following function:
function myFunction () {
$.getJSON('remote.php', function(json) {
var messages = json;
function check() {
...
and I call there the remote.php script which makes a simple select query and returns all data with json.
I would like to pass a parameter to this query called time
, which will be filled earlier in my code by:
var actualTime = new Date(params);
I know that on php script I have to do:
$time = $_POST['time'];
but how should I modify my jquery then to pass this argument further?