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
Post a Comment