Why not working
| From: | dean | Date: | Mon, 20 May 2002 01:02:46 +0000 |
| Subject: | Why not working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-98404@lists.php.net to get a copy of this message | ||
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 = "sendmeform@email.com";
$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 = "mye-mail@here.com";
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");
}
?>