I'm trying to implement a script on my site that will count and display the number of times a link has been clicked in a view/download type directory. I've done this type of thing before, but I lost the site I had the information on after a server crash (and then my hard drive fried right after. Irony, irony), and I can't find the site I originally found the tutorial on.
What I'm looking for is something that will read the links I have in an SQL database, then write the information to one of two fields (one for view, one for download), depending on which link was clicked. I'm not looking to download some bloated script, just hoping that perhaps someone could give me a link that explains this in a bit more detail or walk me through it. The closest I've found is a script that will redirect based on an id assigned to each link, but I'm hoping that I would be able to edit in this information without modifying my existing code too much or adding multiple rows whenever I add a new section to my site. For illustration purposes,
here's an example of the type of page I'm trying to get this on.
Thanks for any help; I know this might be a little too specific. OTL