I'm trying to retrieve all the data inside the database when the page is loaded but when I try to click the refresh button nothing was returned, do you have any idea why? Here is my code:
$(window).load(function (){
$.ajax({
url: 'get.php',
dataType: 'json',
success: function (data){
$.each(data, function(i,item) {
$('#info').append("<p> you are:"+data[i].username+"</p> <p> your message is:"+data[i].msg);
})
}
});
});