Could anyone help me out with the following script. Have I defined the foreach function correctly. The error message I get is below.
Cheers.
<?php
$body =\"\";
foreach ($HTTP_POST_VARS as $name=>$value)
{
$body = $body . \"$name=$value\n\";
}
mail ($mailform_to, $mailform_subject, $body,
\"From: \" . $mailform_form);
header(\"Location: $mailform_url\");
?>
Fatal error: Call to unsupported or undefined function foreach() in /www/vhtdocs/preview1/php/comes/mailform.php on line 4