<?php
add_action('init', 'process_post');
function process_post()
{
?>
<script>alert('it works');</script> <!-- page load time called -->
<?php
}
?>
1
2
3
4
5
6
7
add_action( 'init', 'process_post' );
function process_post() {
if( isset( $_POST['unique_hidden_field'] ) ) {
// process $_POST data here
}
}