Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Click counter, how?
08-14-2013, 02:04 AM #1
- Join Date
- Aug 2013
- Thanked 0 Times in 0 Posts
Click counter, how?
Okay, so I don't know if i'm posting this to the right forum section so sorry in advance.
I'm trying to make a site where you can click on a button, and then it ads + 1 to the already written number. So if the counter is on 5 i want it to go to 6 when i click the button.
But now the thing is, i want the counter to count up on computer1, if i click the botton on computer2.
So what language should i use? and how?
Hope someone understands, I really suck at explaining so just ask if i was unclear somewhere!
08-14-2013, 10:56 AM #2
- Join Date
- Feb 2009
- Ilkley, West Yorkshire, UK
- Thanked 727 Times in 721 Posts
So you're just counting clicks made by anyone accessing the site, from anywhere? You'll need to store the click count in a database (typically, for something so simple you could probably mess around with a text file as well) and then write some code which increments the database value every time someone clicks. You could make this more sophisticated (say) by logging the IP address of the clicker and preventing any more increments from that IP.
There's a number of technologies which would let you do this - PHP accessing a MySQL database would be a reasonable place to start.
Users who have thanked SB65 for this post: