Sorry, you were getting pretty technical so I didn't think to explain it.
You can use the PHP function var_dump to view what's in the $_POST array. That way, you know exactly the right name to use in your functions. You can insert var_dump("$_POST"); into your code, and the contents of the $_POST variable will be dumped. Where it gets dumped depends on where you insert the code.
I sometimes write to a file on the server, or instead I email the contents of the array. Since we know $_POST is an array, it's safe to use the "print_r" function, instead of var_dump, like this:
// format: email address, subject line, body
// the "true" parameter for print_r tells it to return the array, not echo it
wp_mail("firstname.lastname@example.org", "Subject line var_dump of post variable", print_r("$_POST", true));
That will email you nice looking output from the $_POST array, and you can see the names of your inputs there.
Is this form 6? If so, you should remove the first 6, after #input_ and I think it will be fine.
Posted 11 years ago on Wednesday October 19, 2011 | Permalink