<script type="text/javascript"> $(document).ready(function(){ $("#datacount").load("select.php"); setInterval(function(){ $("#datacount").load('select.php') }, 20000); }); </script>