View Single Post
Old 01-06-2013, 04:31 AM   PM User | #3
linek98
New Coder

 
Join Date: Dec 2012
Location: England
Posts: 18
Thanks: 0
Thanked 4 Times in 4 Posts
linek98 is an unknown quantity at this point
If you want to count clicks on image and send those clicks later to server-side script then the best choice is to use JavaScript. You should listen to "click" event of every single image. On click event you should increment clicks count of an image event occured on.

What I would do is create hidden inputs with default value of 0, each for every image. When user clicks an image, JavaScript increments it's corresponding input value. Values of those inputs will be sent together with login form so you can access them in PHP.
linek98 is offline   Reply With Quote