I am using a php function to count when mouse moves. Its called inside java script. However, function is called ones but prints the same value when called for second time. Code goes like this. Every times it alerts 0 instead of counting.
<?php
$i=0;
function page($i)
{
echo $i;
$i++;
}
//page()
?>
<html>
<head>
<title>onmousemove test</title>
<script type="text/javascript">
window.onmousemove = move;
function move() {
alert("<?PHP page($i);?>");
}
</script>
</head>