Re: Help with mail() function
| From: | Matt Matijevich | Date: | Mon, 02 Feb 2004 20:50:44 +0000 |
| Subject: | Re: Help with mail() function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-176618@lists.php.net to get a copy of this message | ||
[snip]
<?php
if ($TextArea="") {
echo "You have to fill out the entire form,
go back and try again.";
} else {
$to = "me@myemailaddress.com";
$from = "From-Test";
$subject = "Subject-Test";
$message = "$TextArea";
mail($to, $subject, $message,"From: $from");
echo "Thankyou";
}
?>
[/snip]
What is happening when the form is posted?
This is just a guess, but I think registar_globals is probaby off. try
this
<?php
if ($_POST['TextArea']="") {
echo "You have to fill out the entire form,
go back and try again.";
} else {
$to = "me@myemailaddress.com";
$from = "From-Test";
$subject = "Subject-Test";
$message = "$TextArea";
mail($to, $subject, $message,"From: $from");
echo "Thankyou";
}
?>