dimanche 19 avril 2015

PHP contact form error that i cant find

can someone help me with this? I simply can't find the problem. Mail just wont go.


HTML :



<form action="mail.php" method="post" enctype="text/plain">
<div class="span_of_2">
<div class="span2_of_1">
<h4>Name:</h4>
<div class="book_date btm">

<input class="" type="text" placeholder="Name" name="name">

</div>
<h4>Check in:</h4>
<div class="book_date btm">

<input name="checkin" class="date" id="datepicker1" type="text" value="DD/MM/YY" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'DD/MM/YY';}">

</div>
<div class="sel_room">
<h4>Apartment:</h4>
<select id="country" onchange="change_country(this.value)" class="frm-field required" name="apartment">
<option value="null">Pick an apartment:</option>
<option value="1">Small apartment</option>
<option value="2">Big apartment</option>
</select>
</div>
<div class="sel_room left">
<h4>Adults:</h4>
<select id="country" onchange="change_country(this.value)" class="frm-field required" name="persons">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
</div>
<div class="span2_of_1">
<h4>e-mail</h4>
<div class="book_date btm">

<input class="" type="text" placeholder="e-mail" name="email">

</div>
<h4>Check out:</h4>
<div class="book_date btm">

<input name="checkout" class="date" id="datepicker" type="text" value="DD/MM/YY" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'DD/MM/YY';}">

</div>
<div class="sel_room">
<h4>Children:</h4>
<select id="country" onchange="change_country(this.value)" class="frm-field required" name="kids">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>

</div>
<div class="clear"></div>
</div>
<div class="res_btn" style="margin:0 auto;">

<input type="submit" value="Make reservation" style="background: #32A2E3; height: 50px; font-size: 20px; font-family: 'Open Sans', sans-serif;" name="send">

</div>
</form>


PHP :



<?php

if (isset($_POST["send"])){

$Name = $_POST["name"];
$Email = $_POST["email"];
$Checkout = $_POST["checkout"];
$Checkin = $_POST["checkin"];
$Apartment = $_POST["apartment"];
$Persons = $_POST["persons"];
$Kids = $_POST["kids"];

$To = "jurica.mlinaric@gmail.com"; // this is your Email address
$Subject = "Apartmani Costa Rica";
$Message = "From : $Name";
$Headers = $Email;
mail($To, $Subject, $Message);
echo "Email Sent.";

}

?>


I really dont know what the problem is. Its a simple html contact form. My server is but it just wont send it.


Aucun commentaire:

Enregistrer un commentaire