I am building a website and I have a button which allows an user to download a file.
Here is how my table in phpmyadmin looks like:
And here is my code that allows an user to download a file:
<a href="data/<?php echo $date['name']; ?>" download><input type="submit" name="submit" value="Prenesi"></a>
How can I store a number of times the button was clicked in my MySQL table? I only found a topic where somebody wanted to store a number of downloads in TXT file, but I don't want to do that.
Thank you for your help! :)