Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    1
    Thanks
    1
    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!

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,957
    Thanks
    9
    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.
    Use the W3C HTML Validator and CSS Validator to check your code and Firebug to see what css is applied to an element
    Read Steve Krug's book Don't Make Me Think - essential reading on web usability
    I don't recommend much, but I do recommend Clook for UK web hosting

  • Users who have thanked SB65 for this post:

    Trying (08-14-2013)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •