0

I am trying to Use init to act on $_POST data by putting the following code in the functions.php of my theme, but I get HTTP 500 error on my WordPress blog. Can anyone help me out?

add_action( 'init', 'process_post' );

function process_post() {
  if( isset( $_POST['unique_hidden_field'] ) ) {
      // process $_POST data here
  }
}  
ɢʀᴜɴᴛ
  • 32,025
  • 15
  • 116
  • 110
Reda
  • 11
  • 3

0 Answers0