Php source codes for Contact

                    In those days as you observer when you click "contact navigator" definitely a page will be opened, in that page you will see a form with some labels, textboxes and so on...with mentioning you to,
Enter your email id.
Enter your name.
Enter your contact no.
Select the time and so on…



                    When you fill the details you definitely get a reply with a subject and with some matter, as we received your mail and we contact you soon or just like some matter send to your mail Id. I think you got it what I am discussing here, OK meanwhile when coming to technical side what happens here the code is written in such a manner that, at the time when User clicks the submit button, here two actions take place i.e. as follows:-

                    First one is an email send to the admin with the details that what the user fill in the form.
Second one is an email send to the user with compliments that company mentioned.

                 Mean while Php source codes for Contact is as follows and a point to remember that it should be posted in the starting of the Php page and I hope this Php source codes for Contact definitely helpful for you. For more details redirect to



<?
if($_POST['Submit']=='Submit')
{

extract ($_POST);

//user mail
$sendTo = $email;

$subject = "Sub :Thank you";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: YOUR COMPANY NAME <contact@YOURDOMAINNAME.COM>';
$message = "<html><head></head><body><font-style:italic; color:#FF0099> Dear ".$_POST['name'].", <br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thanks for your interest........... YOUR COMPLIMENTS CONTINUES HERE. We have received all your details and we will contact you at the earliest. <BR><br> CONTINUE YOUR SUBJECT .<br><br>";
$message = $message."Thanks & Regards.<br>----------------------------<br>NAME,<br>YOURS SCINCEARLY<br>YOUR COMPANY NAME<br>
www.YOUR COMPANY NAME.com</body></html>";
//$from = "YOUR COMPANY NAME";
@mail($sendTo, $subject, $message, $headers);


//admin mail
//$sendTo_a = "contact@YOURDOMAINNAME.COM";
$sendTo_a = "ADMINID@gmail.com";
$subject_a = "Sub :Student Enrole Form";
$headers_a = 'MIME-Version: 1.0' . "\r\n";
$headers_a .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers_a .= 'From:'.$name.'<'. $email.'>';

$message_a = "<html><head></head><body>".$_POST['name'].",
is Register as in your www.YOUR COMPANY NAME.com<br>".

"<table width='83%' bgcolor=#EFF8F8 border='0' align='center' cellspacing='0' cellpadding='5'>
<tr>
<td width='30%'>Name</td>
<td width='5%'>:</td>
<td width='45%'>$name</td>
</tr>
<tr>
<td>Email Id</td>
<td>:</td>
<td>$email</td>
</tr>
<tr>
<td>Contact Number</td>
<td>:</td>
<td>$number</td>
</tr>
<tr>
<td>Qualification</td>
<td>:</td>
<td>$quali</td>
</tr>
<tr>
<td>Prefer Timings</td>
<td>:</td>
<td>$sel</td>
</tr>
</table>

</body></html>
<br> ";

@mail($sendTo_a, $subject_a, $message_a, $headers_a);
//end admin mail
echo "<script>";
echo "location.replace('YOUR NEXT PAGE.php')";
echo "</script>";
}

?>

No comments: