<?php
if(isset($_POST['submit'])){
$to = "email@example.com"; // this is your Email address
$from = $_POST['email']; // this is the sender's Email address
$first_name = $_POST['first_name'];
$subject = "Form submission";
$subject2 = "Copy of your form submission";
$message = $first_name . " wrote the following:" . "\n\n" . $_POST['message'];
$message2 = "Here is a copy of your message " . $first_name . "\n\n" . $_POST['message'];
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to,$subject,$message,$headers);
mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender
echo "Mail Sent. Thank you " . $first_name . ", we will contact you shortly.";
}
?>
<form action="" method="post">
Ваше имя <input type="text" name="first_name"><br>
Email: <input type="text" name="email"><br>
Телефон:<br><textarea rows="5" name="message" cols="30"></textarea><br>
<input type="submit" name="submit" value="Submit">
</form>
Вот эту форму замени на ту, которая сейчас на сайте
<form action="" method="post">
<li>
<input name="first_name" type="text" class="text" value="Ваше имя" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Ваше имя';}">
<a class="name" href="#"></a>
</li>
<li>
<input name="email" type="text" class="text" value="Email Адресс" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email Адресс';}">
<a class="mail" href="#"></a>
</li>
<li>
<input name="message" type="text" class="text" value="Телефон" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Телефон';}">
<a class="num" href="#"></a>
</li>
<input type="submit" value="Заказать звонок">
</form>