In PHP,
I want to execute a function when a hyperlink is clicked. The only way I can think of doing this is by having the link attach a get parameter to the url when clicked and by doing an if statement that checks to see if that parameter exists and if so then have the function executed. But is there a way to do this like:
<a href='#' onclick='<?php functionName(); ?>'>
Obviously there are a million things wrong with this example but is it possible in any other way?