Need to record when someone clicks on download link

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • snowycat
    New Member
    • Apr 2007
    • 2

    Need to record when someone clicks on download link

    Hi

    I am writing a PHP script and using MySQL to store visitor details, and I am supplying a link for a visitor to download some zip files.

    Can someone help with a script that detects that the download link has been clicked, so that I can put a flag in the database?
  • michaelb
    Recognized Expert Contributor
    • Nov 2006
    • 534

    #2
    This may not be the best approach, but perhaps its worth trying.
    Your link may look similar to this:

    href=stats.php? fname=file_to_d ownload

    stats.php would update the database and then immediately redirect the browser to the download url for given filename.

    Comment

    • snowycat
      New Member
      • Apr 2007
      • 2

      #3
      Originally posted by michaelb
      This may not be the best approach, but perhaps its worth trying.
      Your link may look similar to this:

      href=stats.php? fname=file_to_d ownload

      stats.php would update the database and then immediately redirect the browser to the download url for given filename.
      That looks good, thanks. I will try it.

      Comment

      Working...