Send an HTML email to form submitter.?

kanwal shiekh

New member
Hello, This is my php code and i am facing three problems.
1) I don't want to send email when visitor submit the form with blank cell and want to show different errors like "Please Type Your Name" etc.
2) I want to send an confirmation email to visitor that we have receive his/her email. (not for email confirmation)
3) I want to send HTML emails (with bold, colorful, like a webpage) to my email and visitor's email as well.

If some one knows about these problems please tell me i will be very thankful to you.

Thanking You

<?php
$to = '[email protected]';
$subject = 'Enquiry by Webiste';
$message =
"Name : ".$_POST['name']."\r\n" .
"Qualification : ".$_POST['qualification']."\r\n" .
"Mobile Number : ".$_POST['mobile']."\r\n" .
"Email : ".$_POST['email']."\r\n" .
"Destination : ".$_POST['RadioGroup1']."\r\n" .
"Course : ".$_POST['courses']."\r\n" .
"Message : ".$_POST['message']."\r\n" .
$headers = 'From:' .$_POST['email']."\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers)
?>
 
Back
Top