This is very basic. Actually, it involves more javascript or forms. Simply create a HTML form with a hidden field that submits to itself. Then in php code, you check if the hidden field was submited, if so, it executes the php function. You could also extend it and create some AJAX code to load another page.