I'm writing code from within a plugin and I'm attempting to create a two-part registration form. I'm using POST to determine if the first part of the form was submitted or not. Unfortunately, though, the POST data is not coming through. Here is what my form looks like:
<form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post">
<input type="submit" name="user_info_form" id="user_info_form" />
</form>
This should POST back to the same page, in theory. I then use the below code to read the POST data.
if(isset($_POST['user_info_form']))
{
echo "found data";
}
else
{
echo "nothing found";
}
Unfortunately, "nothing found" is being outputted following a form submission.
Is there any reason for this that has to do with WordPress? I've been at this for hours now so any help is very much appreciated!
print_r( $_POST )? – m0r7if3r Feb 2 '12 at 11:20action='', see if that gets the post data in there – m0r7if3r Feb 2 '12 at 23:13