Hello all, newbie here with a, hopfully, easy question. I'm creating a simple site for personal use for family photos and things and I am having troable with my onclick only working once. I've searched the web bu found no answer that has solved my issue. I've stripped my code to bare minimum just to test the on click and still will only work once. Any help would be greatly appreciated.
<?PHP
$number = 1;
?>
<HTML>
<HEAD>
<script Type="Text/javascript">
function add()
{
<?php
$number += 2;
?>
document.getElementById("test").innerHTML = "<?PHP echo $number; ?>";
}
</script>
</HEAD>
<BODY>
<Table><TR><TD><button onclick="add();">CLICK</button><P id="test">One</P></TD></TR></Table>
</BODY>
</HTML>