Need Some PHP help from the gurus

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JSWENSON
    So Fucking Banned
    • Aug 2004
    • 3153

    #1

    Need Some PHP help from the gurus

    I need a php code sniplet that will increment a variable everytime a submit button is clicked. Another words it needs to count +1 everytime the submit is clicked. Thanks in advance.
  • dissipate
    The Dirty Frenchman
    • Nov 2005
    • 8904

    #2
    is this per user? or is this an overall count of the submit button

    Comment

    • Screaming
      I can change this!!!!!
      • Feb 2004
      • 18972

      #3
      how much you offering for this?

      Comment

      • JSWENSON
        So Fucking Banned
        • Aug 2004
        • 3153

        #4
        per user

        Originally posted by dissipate
        is this per user? or is this an overall count of the submit button
        It would need to be per user. Thanks

        Comment

        • dissipate
          The Dirty Frenchman
          • Nov 2005
          • 8904

          #5
          you can use a mysql database to track thier IP, resetting it each day

          Comment

          • darksoul
            Confirmed User
            • Apr 2002
            • 4997

            #6
            Code:
            <?php
            session_start();
            $_SESSION['clicks']++;
            
            echo "You clicked $_SESSION['clicks'] times dude!";
            ?>
            1337 5y54|)m1n: 157717888
            BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
            Cambooth

            Comment

            • JSWENSON
              So Fucking Banned
              • Aug 2004
              • 3153

              #7
              Thanks for the help

              Originally posted by dissipate
              you can use a mysql database to track thier IP, resetting it each day
              Your suggestion gave me an idea that worked fine, thanks used the following:

              if ($submit) {
              $_SESSION[$accountselnum] = $_SESSION[$accountselnum] + 1;
              }else {
              $_SESSION[$accountselnum] = 0;
              }

              Comment

              • SMG
                Confirmed User
                • Aug 2003
                • 1798

                #8
                Originally posted by JSWENSON
                Your suggestion gave me an idea that worked fine, thanks used the following:

                if ($submit) {
                $_SESSION[$accountselnum] = $_SESSION[$accountselnum] + 1;
                }else {
                $_SESSION[$accountselnum] = 0;
                }
                just remember that if that guy clicks, then goes to the page without clicking, that will reset his click count ... dunno if that matters to you but figured I'd say it anyway :P
                TGP Webmasters: sign up for the top 100 tgp list!
                Submit galleries
                If you add me to icq (title) make sure to mention GFY or I'll think you're a bot and deny you.

                Comment

                Working...