Hi I have the following code and was wondering if its possible to make the PHP part repeat so the javascript var is kept upto date even if a new row has been add to the table?
<script type="text/javascript" >
var total_rows = [];
<?php
$con = mysql_connect("localhost", "user", "password");
$total = mysql_query("SELECT * FROM table");
$num_rows = mysql_num_rows($total);
?>
var total_rows = "<?php echo $num_rows ; ?>";
</script>