Hello Everyone...
I have a question, which I hope has a relatively simple answer. I am trying to set up a page that will enable me to enter one variable into a form letter and then type in an email address I want the form letter sent to.
So far I have this:
<form action="welcomeletter.php" method="post">
<!-- Do this for each variable in the letter or one big variable for
$contents -->
<!-- but keep in mind there's a size limit on variables being passed -->
<p>
<input type="text" name="retreatdate" value="<?php echo $retreatdate ?>">
<input name="submit" type="submit" value="Insert Date">
<input type="text" name="email" value="">
<input name="submit" type="submit" value="Send Email">
</p>
<p> </p>
<p> </p>
</form>
<p>
<?php
// Reads all the lines of the file into an array and
// then joins the lines into one variable
$contents = join("", file("welcome.html"));
// Do one line like this for each variable
$contents = str_replace("%%retreatdate%%", $retreatdate, $contents);
print "$contents";
?>
The entering of the variable (the retreat date) works just fine and it displays the results correctly. Now I'm at the point where I need to type in the email address I want to send the completed results to, and I'm at a loss as to who to do it. I'd also like the email cc'd to me.
I hope all that makes sense and that someone here can help me out.
Thanks in advance for any help!! I really appreciate it!!
Jen