Creating a Hit Counter for Image Album

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sqadree
    New Member
    • Jun 2007
    • 2

    Creating a Hit Counter for Image Album

    I am using PHP MySQL with Dreamweaver cs and create Photo Album
    now i want to create function in my photo album
    " No of User View By Photo " count Photo View
    if some one know please tell me

    Thnks in advance

    Regards
    Last edited by ak1dnar; Jun 30 '07, 08:27 AM. Reason: Thread title changed - Original Title: Photo view count
  • ak1dnar
    Recognized Expert Top Contributor
    • Jan 2007
    • 1584

    #2
    Originally posted by sqadree
    I am using PHP MySQL with Dreamweaver cs and create Photo Album
    now i want to create function in my photo album
    " No of User View By Photo " count Photo View
    if some one know please tell me

    Thnks in advance

    Regards
    Hi,
    If you want to count the Number of users who visited your Album images,You can create a hit counter to track them.

    For example,Lets say this URL.


    Here users comes to view_album.php page and here you have list all the images in album as thumnails.
    Once user click the one of the thumbnails you should call for another php script.

    Example:


    this enlarge.php is responsible for display the Original view of the image and at the same time you have to update the number of visits to that image ID.

    So create a Table for the hit counter.
    exapmle:
    record_d - image_id - hits
    1 - 1001 - 20
    2 - 1005 - 80

    Based on the image number you can update the hits column for each visit.

    Comment

    • kovik
      Recognized Expert Top Contributor
      • Jun 2007
      • 1044

      #3
      Yerp. ^_^

      Assuming you're images are already governed by a database, add a 'views' field to the table, and just query an update.

      [code=sql]UPDATE `imagesTable` SET `views` = `views` + 1;[/code]

      Comment

      • sqadree
        New Member
        • Jun 2007
        • 2

        #4
        Many Thanks for your replay
        but my problem is not solve
        i am not professional progeammer please tell me step by step
        how to create hit counter for image album with MYsql php Dreamweaver Cs
        waiting for your quick responce

        thanks in advance
        SAQ

        Comment

        • dafodil
          Contributor
          • Jul 2007
          • 389

          #5
          Originally posted by sqadree
          Many Thanks for your replay
          but my problem is not solve
          i am not professional progeammer please tell me step by step
          how to create hit counter for image album with MYsql php Dreamweaver Cs
          waiting for your quick responce

          thanks in advance
          SAQ
          Man I think you should study html and php.....

          You are already using Dreamweaver so I think it will be easy to design your pages using that...

          Check this site so that you can learn the fundamentals:
          w3schools.com

          Comment

          • kovik
            Recognized Expert Top Contributor
            • Jun 2007
            • 1044

            #6
            Don't let Dreamweaver cripple you! Dreamweaver should be treated as mixture of an FTP and text editor. Anything beyond that is too much dependence. The solutions will become more obvious as you learn more about programming.

            Comment

            • Atli
              Recognized Expert Expert
              • Nov 2006
              • 5062

              #7
              Originally posted by volectricity
              Don't let Dreamweaver cripple you! Dreamweaver should be treated as mixture of an FTP and text editor. Anything beyond that is too much dependence. The solutions will become more obvious as you learn more about programming.
              I agree. I love Dreamweaver, but only as a great editor.
              Do not get dependent on the wizards or the fancy design stuff. At least not without knowing how to do it without them.

              Comment

              Working...