Hi there. I’ve been reading up on lots of tutorials on how to do this, but I’m stuck. I need to set up a script that will send out a confirmation email to the user’s email when they submit a form on my website. Here is the code of my contact.php that submits the contact form information fine, but I’m having real trouble getting a confirmation script to work with this.
[code]<?PHP
/*
Contact Form from HTML Form Guide
This program is free software published under the
terms of the GNU Lesser General Public License.
See this page for more info:
http://www.html-form-guide.com/contact-form/simple-php-contact-form.html
*/
require_once("./include/fgcontactform.php");
$formproc = new FGContactForm();
//1. Add your email address here.
//You can add more than one receipients.
//$formproc->AddRecipient(‘[email protected]’); //<<—Put your email address here
$formproc->AddRecipient(‘[email protected]’);
//2. For better security. Get a random tring from this link: http://tinyurl.com/randstr
// and put it here
$formproc->SetFormRandomKey(‘WRHjcspe5UGGCtJ’);
if(isset($_POST[‘submitted’]))
{
if($formproc->ProcessForm())
{
$formproc->RedirectToURL(“thank-you.php”);
}
}
?>
Contact us Contact us' maxlength="50" />
' maxlength="50" />
' maxlength="15" />
<?php echo $formproc->SafeDisplay('message') ?>
I’m on a bit of a time crunch, so if someone could help me out, I’d really, really appreciate it.
Thank you so much!
~Saito