I'm working on wordpress. I write this code to run php_function
On onclick
event. But everytime I reload the page, the php_function runs.
In the other words, I want this function (php_function) just runs with Onclick event, Not page reload or anything else. How can i handle this issue?
Any help would be apreciated. Thanks.
<input type="submit" class="button" value="Validate"
onclick="document.write('<?php php_function( $post ); ?>');"
/>