Image CLICK counter
I have an Image on my page and I want to count how many times the image has been clicked on and show the number beside the image. Also I dont want the number to reset everytime the page is reloded.
How can I do that
Thank you for help
You have to use AJAX for that purpose. And you also need to save your current counter somewhere on the server, for example in the database.
Just send AJAX request only after clicking on the image and update the number of clicking.
A single difficulty, it would be advisable to preload the sound !
// imagecounter.php file
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// remove the js file
// return the new script
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread