SDP2006
06-23-2003, 01:09 AM
Is there a way to make this send to a user by defining it in a form. For instance, instead of having to specify it in the code, could you put it in a form, and it would
<?php
print("Thank You. Your mail has been sent!")
$senderemail = $_POST['email'];
$sendername = $_POST['name'];
$recipient = "test@thewww.com";
$subject = "(no subject)";
$mailheader = "From: $senderemail\n";
$mailheader .= "Reply-To: $senderemail\n\n";
$message = "- $sendername";
mail($recipient, $subject, $message, $mailheader) or die ("Failure");
?>
Where there is $recipient, could you make that do like the $senderemail by maybe doing this -- $recipient = $_POST['recip']; -- ??
Thanks:cool:
<?php
print("Thank You. Your mail has been sent!")
$senderemail = $_POST['email'];
$sendername = $_POST['name'];
$recipient = "test@thewww.com";
$subject = "(no subject)";
$mailheader = "From: $senderemail\n";
$mailheader .= "Reply-To: $senderemail\n\n";
$message = "- $sendername";
mail($recipient, $subject, $message, $mailheader) or die ("Failure");
?>
Where there is $recipient, could you make that do like the $senderemail by maybe doing this -- $recipient = $_POST['recip']; -- ??
Thanks:cool: