I am having issues with flush() The following script worked fine, but then when I shut down and restarted it decided not to work. It does not flush the first echo command to the browser. Can anyone explain..? Cheers!
echo str_repeat(" ", 300) . "\n";
echo '<span id="processing"><br><br><br><br><div align="center"><font size="2" face="verdana"><b>Processing Your Payment...<br><br>Please Wait</b></font></div></span>';
flush();
$passed = FALSE;
for($e = 1; $e < 5; $e++) {
sleep(5);
$res = mysql_query("");
if(mysql_num_rows($res)) {
$passed = TRUE;
break;
}
}
echo "<script>processing.style.display='none'</script>";
if(!$passed) {
die('fail');
} else {
echo 'success';
}