[ciapug] $_POST vars and html email?

David Champion ciapug@cialug.org
Fri, 07 Nov 2003 15:23:51 -0600


I have an html form like this:

<form action="http://www.foo.com/test.php" method="POST">
<input type="hidden" name="foo" value="bar">
<input type="submit" name="btn_foo" value="btn_bar">
</form>

... and test.php says:

<?
foreach ($_POST as $key1 => $value1) {
	echo "<br>$key1 : $value1";
}
?>

If open this first form in my web browser and submit it, I get the 
expected behavior - the page displays "foo : bar". If I then send an 
HTML email with the exact same form, test.php displays nothing. I also 
tried spitting out everthing by subsituting "$GLOBALS" for "$_POST" and 
there is no key called "foo" or value called "bar".

I verified by saving the email source, then running "base64 -u ..." to 
decode it, and there's nothing wrong with the HTML.

I tested with Mozilla 1.4.x and Thunderbird, as well as Outlook and they 
all do (or don't do) the same thing.

Ideas?

-dc