Run a PHP Function when User Clicks a Link Using the Post Method -


what cleanest way run php code below instead of $_get, using $_post instead?

<?php function run_my_function() {     echo 'i ran php function!'; } if (isset($_get['run'])) {     run_my_function(); } ?> <html> <body>     <p>hello there! <a href="?run">run php function.</a></p> </body> </html> 

no, cannot send post request anchor tag. have use <form>


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -