Insanely stupid PHP problem

software development


I am going batty here. I am doing form processing, and for some reason, can’t get to my form values in a way I’m familiar with - the $_REQUEST and $_POST variables don’t seem to be there! I must be doing something REALLY stoopid. Here’s the current code in my form processing script:

include_once ("./scripts/");

// process the form inputs… what do we have?
print “HERE!
print_r ($_SERVER);
print “
print_r ($_REQUEST);
print “
print_r ($_POST);
print “

print “


$name = $_REQUEST[“name”];
$email = $_REQUEST[“email”];
$message = $_REQUEST[“message”];
$maillist = $_REQUEST[“maillist”];

$outMessage = “Contact from the web:\n” .
“Name: $name\n” .
“Email: $email\n” .
“Message: $message\n\n” .
“Wants on list: $maillist\n”;

mail(various parameters);
This is debug code, of course. When this is run, the $_SERVER variable prints out nicely. But both the $_REQUEST and $_POST variables just show up as “Array ( )”. What the heck is going on? What have I missed? I am going nuts. I do this for a living, really.

The include just has a couple of functions in it that have been running for a couple of years that print some boilerplate out into my HTML. I have commented that out, and had the exact same problem.



Yep, I was right - stoopid. Sorry. My form variables had ids, not names. Sheesh. On to the next stoopid pet trick…