I have created a form that directs to a thanks.php. Now all of a sudden it isn't working and I think that it could be because the hosting is now PHP 5 x.
Below is the code that I have and the errors that I am getting. Can some please help.
<script language="php">
$email = $HTTP_POST_VARS[email];
$mailto = "email@email.com";
$mailsubj = "Form Name";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
</script>
Errors:
Warning: reset() [ function.reset]: Passed variable is not an array or object in
Warning: Variable passed to each() is not an array or object in /
|