Cannot get this to refresh. My code is below. I am propably doing something silly, but I cannot figure it out...
var auto_refresh = setInterval(
function(e) {
var email = '<?php echo $_SESSION['user_email']?>';
console.log(email);
e.preventDefault();
$.ajax({
type : 'GET',
url : 'count_record.php', // in here you should put your query
data : 'email='+ email, // here you pass your id via ajax .
// in php you should use $_POST['post_id'] to get this value
success : function(r){
// now you can show output in your modal
$('#messages1').load(r).fadeIn("slow");
}:15000);
}
});