My mail function won't let me pass my $message variable...can't figure out why, I can get the vars from the from passed to this page and display them but as soon as I try to pass that specific variable...it gives me a server error, contacted the server nothin they can do...it works if I just use a string as the $message but not the variable containg the form responses. I know that the below might look poor, but trust me I thought I had something nice b4 and I have worked backwards just for the sake of attempting not to kill myself..."so it has to do with the way that $message is being passed around"
<html>
<body bgcolor="#EEEAD7" text="#EEEAD7">
<?php
$message=""; //tried assigned this to the function below and then returning it, but that didn't work either
DisplayArray( $HTTP_POST_VARS );
function DisplayArray ( $aArray )
{
$to = "survey@germiphene.com";
$subject = "customer survey";
if (!$from) { $from = "sean@germiphene.com"; }
global $message;
foreach( $aArray as $key => $val )
{
$val=stripslashes($val);
echo "<b>$key</b> = $val<br>";
$message .= "$key = $val\n";
}
echo "hello all<br>"; //just for spacing, debug tool
}
echo "$message";
mail($to, $subject, $message);
?>
<div align="center"><b><font color="666633">Your information has been delivered:</font></b>
<p>
<b><font color="666633">Thank You!</font></b>
<p>
<form>
<div align="center">
<input type=button name="quit" value="Close this window" onClick="self.close();">
</div>
</form>
<!--<br><br><a href="<? echo "$HTTP_REFERER"; ?>">Return To The Mail Form</a><br><br>-->
</div>
</body>
</html>