Help Making A Simple Click Counter?

Discussion in 'HTML & Website Design' started by SUPERSTEVE9219, Jun 25, 2008.

  1. #1
    Ok all I need is a simple button, somewhat like a giant digg button, with a button on the bottom that says "I support blah blah" then when you click that the number above it changes.

    I really have no idea where to get started on this

    Any help guys?
     
    SUPERSTEVE9219, Jun 25, 2008 IP
  2. MCJim

    MCJim Peon

    Messages:
    163
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    One way is to
    1. Make a MySQL row that holds the amount of clicks
    2. Fetch the amount of clicks from the MySQL row using SELECT
    3. Display the amount of clicks on the button with php
    4. If the user clicks the button, UPDATE the MySQL row and increase the click value

    Another way is to store the number in a text file and retrieve it from there. This might be better and easier if everything else on your website is static.
     
    MCJim, Jun 25, 2008 IP