I've searched around and couldn't find anything that really helped much on this.
I'm trying to make a script that records the coordinates of mouse click's that have the coordinate 0 in it so for example x=0 y=125 NOT X=100 y=125 And when it detects coords like that I want it to add them to my mysql database like this.
Username - the user who hit the coord
x - x coordinate
y - y coordinate
amount - how many times they hit that coord
Anyone think they could help me with this?
Updated with code.
<script>
$(document).ready(function(){
$('.map').click(function(e){
alert('x pos: ' + e.pageX + '; y pos: ' + e.pageY + ';');
if(e.pageX == 0 || e.pageY ==0){
<?php
mysql_query("INSERT INTO clickmap (id) VALUES ('".$_SESSION['username']."')")
or die(mysql_error());
?>
}
});
});
</script>