Monday, 29 December 2014

Tagged under:

Send Email in php Code With Form

Useing the PHP MAIL function to send form data to email and website PHP contact form script send to your email Address.



Copy and paste this code and save it as send.php

Use of  This Examples :

<?php
if(isset($_POST['butsend']))
$to="youremailid@gmil.com";/*Your Email*/
$subject="Message from Our Counsellors";

$date=date("l, F jS, Y");
$time=date("h:i A");

$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$mobile = $_REQUEST['mobile'];
$city  =$_REQUEST['city'];
$course =$_REQUEST['course'];


$msg="
Message sent from Our Counsellors Form on date  $date, hour: $time.\n
Name    : $name
Email ID    : $email
Mobile No.    : $mobile
City                   : $city
Course                 : $course

";

mail($to,$subject,$msg,"From:".$Email);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="5;url=http://www.mysite.com">
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><h4 style="font:bold 24px Arial, Helvetica, sans-serif; color:#FFF; background:#333;">Thank You...We Will Reply You Shortly...</h4></td>
  </tr>
</table>
</body>
</html>

0 comments:

Post a Comment