Whenever I write echo $_GET['sec'];
then it shows the value of sec
but when I try the following code:
$(document).ready(function() {
setInterval(function () {
$('#div_id').load('../data.php?id_to=<?php $_GET['sec'];?>')
}, 100);
});
The value of "sec", which is coming from another page does not transfer to
data.php
with id_to
variable.
What's wrong with my code?
I can see the value of $_GET['sec'];
in current page but the value is not available on the data.php
file.