I have read 3 posts on SO about how to do this, but its not working for some reason.
On the page index.php, i have this script:
<script type="text/javascript">
function update() {
$.get("index.php", function(data) {
$("#uploadcount").html(data);
window.setTimeout(update, 5000);
});
}
</script>
and then this div, also in index.php
<div id=uploadcount>
<?
$result = mysql_query("SELECT * FROM mydb");
$num_rows = mysql_num_rows($result);
echo "<h1>$num_rows</h1><h2>rows</h2>";
?>
</div>
The php is displaying the row count fine, but it wont refresh the number.
(i have latest jquery build included in head of index.php)