I've made a simple counter using PHP and MySQL.
Now I need to be able to use it with a html page using JavaScript. I have tried everything I can think of, but maybe someone could help me out with this.
Here is what the html page looks like:
Code: Select all
<!-- File: test.html -->
<html>
<head><title>Test counter</title></head>
<body>
<script src="index.php?page=count&id=1" language="JavaScript">
</script>
</body>
</html>Code: Select all
echo "<script>
<!--
document.write("Hits: ".$hits."<br />");
//-->
</script>\n";