I would like to have a simple system that stores the number of times a link was visited. Basically, on click I would like to call a function that adds 1 to a number of clicks stored in the database (using php).Everything should be happening in the background. Apart from that it should work as a normal link.
<a href="example.com" onclick="CALL PHP FUNCTION;">Link to example.com</a>
How can I call a php function? I think this can be achieved using Jquery. Any advice appreciated.