This should send me an e-mail with the form info then send a thank you
letter to the subscriber.
It does the first, but not second, any ideas?
<?
$MailToAddress = "[EMAIL PROTECTED]";
$MailSubject = "Joine-mail list";
if (!$MailFromAddress) {
$MailFromAddress = "$email";
}
$Header = "";
$Footer = "";
?>
<?
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
$val=stripslashes($val);
$Message .= "$key = $val\n";
}
if ($Header) {
$Message = $Header."\n\n".$Message;
}
if ($Footer) {
$Message .= "\n\n".$Footer;
}
mail( "$MailToAddress", "$MailSubject", "$Message", "From:
$MailFromAddress");
?>
<?php
if(isset($Submit)) {
$subject = "Thank You";
$MailFromAddress = "[EMAIL PROTECTED]";
while(list($key, $value) = each($HTTP_POST_VARS)) {
$$key = $value;
$msg .= "$key = $value\n";
}
$comment = "The thank you letter goes here";
// Send reply to them
mail( "$email", "$subject", "$comment", "From: $MailFromAddress");
}
?>