title: How to create download hit counter with database in php and mysql?
body: <p>What an easy to count how many times a file has been downloaded.
  The file details are stored in MySQL database and the files in a folder on the server.
  The files are linked for download via the anchor tag </p>
  
  <pre><code>href=upload/$row['file']
  </code></pre>
  
  <p>generating as an example <strong>filename.zip</strong>
  I was thinking about adding another field to the files table called downloads, somehow when the link is clicked mark that file as <code>$row['downloads'] +1</code> and update the downloads field.</p>