PDA

View Full Version : Help!!


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:

Nightfire
06-23-2003, 01:55 AM
Yeah you can do that

Spookster
06-23-2003, 04:35 AM
SDP2006,

You need to read our rules and our posting guidelines. Do not create another topic until you have read them.

First off do not create multiple threads on the same topic. You already have this particular topic open here:

http://www.codingforums.com/showthread.php?s=&threadid=22036

Second of all your subject titles are inappropriate as per our posting guidelines that you did not read as you were suppose to.

Closing thread...