please help with contact php form

Hi.

I’ve been having trouble with this form for a bit now…(newbie)

I have a contact PHP file that successfully sends all form data to me, but what I need it to do is send a confirmation e-mail to the original poster (with a pre-set message). If possible, I’d like to include an image as part of the signature of the confirmation email.

here is what I have so far:

<? //******************************** // * // Contact Form Submit Script * // * //******************************** // Define the following variables $clientemail = "[email protected]"; // Email to send form data ([email protected]) $clientwebsite = "."; // Domain website is hosted on (domain.com) $returnpage = "contactreturn.html"; // Return page once form is submitted //******************************** // * // Do Not Edit Below This Line * // * //******************************** if (eregi($clientwebsite, $_SERVER['HTTP_REFERER'])) { $fromemail = $_POST['email']; $mime_boundary = "---- Contact Form Submission ----".md5(time()); $headers = "From: ".$fromemail."\n"; $headers .= "Reply-To: ".$fromemail."\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n"; $message .= "--$mime_boundary\n"; $message .= "Content-Type: text/html; charset=UTF-8\n"; $message .= "Content-Transfer-Encoding: 8bit\n\n"; $message .= "\n"; $message .= "

Contact Form Submission

\n"; $message .= "

results from form :

\n"; foreach ($_POST as $key => $value) { $message .= "

".$key." = ".$value."

\n"; } $message .= "\n"; $message .= "--$mime_boundary--\n\n"; $subject = "Contact Form Submission - ".$clientwebsite; mail($clientemail, $subject, $message, $headers); } else { echo "You do not have permission to access this script"; die; $to=$email; $subject="MySutherlands.com Web Response"; / $header="from: name "; // Your message $message="Thank you for visiting mysite.com. We have received your email and someone will contact you as soon as possible. Signature Company Logo name \r\n"; // send email $sentmail = mail($to,$subject,$message,$header); } } header('Location: '.$returnpage); ?>

Any help would be extremely helpful.

Thank you in advance

Hi,

In your pre-set message, just append confirmation link…like,

[php]$message=$message."<a href=www.domain.com/confirm.php&token=f112asf1ae2f121e>Click here to confirm"; [/php]

:wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service