In my js file i have this:
var updateInterval = setInterval(function() {
$('#thealert').load('alertprice.php');
},1*1000);
In my php file i SELECT the latest price from MYSQL database for example 453.33
In html it shows at time 14:00:01 :
453.33
Then at time 14:00:02 :
463.33
How do i get the updated value in a jquery or php variable so i can use it for an alert script ?
I want always to have in variable:
$latestprice = "463.33";
Or what ever latest price is at current time.
I want to store the updated value inside the div in a php variable or jquery or javascript variable to be used by other scripts ,if div value changes then $latestprice should change also.
Update:$latestprice needs to go in here: