I have a simple HTML form on a index.html page. When "submitted" the form action goes to "formprocessing.php" and gets worked on. It's 3 fields: firstname, lastname, and email address. It's a separate page, not posting to self. I don't know if that matters.
The problem is that I'm not accessing the data correctly, it seems. My code is:
//sets up the variables
$firstname = stripslashes($HTTP_POST_VARS['FirstName']);
$lastname = stripslashes($HTTP_POST_VARS['LastName']);
$email = $HTTP_POST_VARS['Email'];
echo "These variables are: $firstname $lastname $email";
die;
I put in the echo line to troubleshoot because I kept getting an "invalid email" error later in the page. There aren't any variables getting retained. I have very similar code working on another page without a problem. Is there a setting I need to change in the php.ini file? Does this "HTTP_POST_VARS" only work in certain cases?
Totally stumped. Thanks for any and all suggestions!