Login Counter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Login Counter

    am trying to create a login counter but the counter number is stuck at 1 please help me and tell me wats wrong

    here is the sql

    visits var 255

    and the coding goes on login.php

    $visits = mysql_query("SELECT ibwf_users SET visits=visit+1 WHERE id='".$uid."'");

    mysql_query("UPDATE ibwf_users SET visits='".($visit[0]+1)."' WHERE id='".$uid."'");
    echo "°Login Counter: <b>$visits Times</b><br/>";

    help please
    Last edited by Pablo; 22.08.09, 04:48.

    #2
    try
    PHP Code:
    $visits mysql_fetch_array(mysql_query("SELECT visits FROM ibwf_users WHERE id='".$uid."'"));

    mysql_query("UPDATE ibwf_users SET visits='".($visit[0]+1)."' WHERE id='".$uid."'"); 
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      it show nothing now look if here is rite?

      echo "&#176;Times Login: <b>$visits</b><br/>";

      Comment


        #4
        try $visits[0]
        Want something coded email me at sales@webnwaphost.com for a prices.




        Comment


          #5
          is there an error being displayed
          Want something coded email me at sales@webnwaphost.com for a prices.




          Comment


            #6
            so wats the error?

            Comment


              #7
              This is the correct..
              PHP Code:
              mysql_query("UPDATE ibwf_users SET visits=visits+1 WHERE id='".$uid."'")
              $visits mysql_fetch_array(mysql_query("SELECT visits FROM ibwf_users WHERE id='".$uid."'"));


              echo 
              "°Login Counter: <b>$visits[0] Times</b><br/>"
              so easy..crazybrumi's post is also correct, but she?/he? missed 1 letter..Its $visits[0] not $visit[0]
              Last edited by kiLLeR-eyEd_14; 21.08.09, 23:43.
              My Blog: http://jhommark.blogspot.com
              My Facebook: http://www.facebook.com/jhommark
              My Official Site: http://www.undergroundweb.tk
              My Community Site: http://undergroundwap.xtreemhost.com

              Comment


                #8
                ..yeah he/she missed 1 letter nice one killer eyed, HANEP SA MATA !! -pmpl-
                Did I help you?
                You can help me too
                Your donations will help me finance my studies.

                Comment


                  #9
                  lol thanx was the same wit mine lol lol

                  Comment


                    #10
                    Originally posted by kei_ki7 View Post
                    ..yeah he/she missed 1 letter nice one killer eyed, HANEP SA MATA !! -pmpl-
                    hehe.,sanay lng kc..I'm not using any php code validator with my phone..Mano mano..Hehe..
                    My Blog: http://jhommark.blogspot.com
                    My Facebook: http://www.facebook.com/jhommark
                    My Official Site: http://www.undergroundweb.tk
                    My Community Site: http://undergroundwap.xtreemhost.com

                    Comment


                      #11
                      Originally posted by Pablo View Post
                      lol thanx was the same wit mine lol lol
                      your 1st post was wrong..Instead to UPDATE, you made it SELECT..Lol..Then the $visits should be in the second sql query and you missed mysql_fetch_array..Then you printed $visits where it is defined to select as what u did, that it should be update..What that messy..
                      My Blog: http://jhommark.blogspot.com
                      My Facebook: http://www.facebook.com/jhommark
                      My Official Site: http://www.undergroundweb.tk
                      My Community Site: http://undergroundwap.xtreemhost.com

                      Comment


                        #12
                        ...........................
                        Last edited by Pablo; 22.08.09, 14:04.

                        Comment

                        Working...
                        X