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>&nbsp;</p>
<p>&nbsp; </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";
?>

Any help would be greatly appreciated.

Thanks in advance!
Jen

Reply via email to