How do I get the value of mouse pisition? If this is Javascript then I guess this goes in the client side. Is there a php function that checks to mouses position or returns the mouse pisition?
PHP is server side JavaScript is client side. You will need to get the mouse x and y via JavaScript and pass it to the PHP page. Prob. the best way would be to use AJAX.