I'm integrating a download counter for my website. My aim is to trigger the counter each time the Download button is clicked and file downloaded.The Download button is here:\[code\]<form action="download.py" method="post"><input type="submit" value="http://stackoverflow.com/questions/15463935/Download" name="DL" onClick="download_file()"/></form>\[/code\]When clicked, a file is downloaded, however, I want to trigger the download counter too:\[code\]import cgiform = cgi.FieldStorage()def count(): c.execute("INSERT INTO dl VALUES ('%d', '%s', '%s', '%s')" % (index, dt, ip, client)) conn.commit() conn.close()if "DL" in form: count() form.list = []\[/code\]In theory, this seems to work, however, the cgi.FieldStorage doesn't get reset if the page is re-loaded, and with each re-load it triggers the DB with a new download, which didn't happen.How could I completely reset or delete the value stored by the FieldStorage? Or is there a better solution you may advice. Thank you!