Google Chrome doesn’t seem to have this problem, I noticed this in Firefox.
So we start by using GET:
function execute_check(){
$.ajax({
type:'GET',
url: 'ajax.php',
success: function(data){
$("#div").html(data);
}
});
}
This works fine if there is something being returned.
Then we have the PHP/mysql:
$result = mysql_query("SELECT * FROM table WHERE value='1' ORDER BY time ASC");
How can I have it return NOTHING rather than 0? I also saw the same thing when I was using the require() function.
on the php side, just add a check…
or if you’re using
require()you’ll want to use…