0
我創建了一個樣本表單。提交表單後,所有值都發送到我的電子郵件,但選定的Datepicker值不會發送到電子郵件。Datepicker值不發送到電子郵件在php
<form action="" method="post" enctype="multipart/form-data">
<input class="date-picker" name="arrival" id="datepicker">
<div class="input-group-addon"><i class="fa fa-calendar"></i></div>
<input class="date-picker" name="departure" id="datepicker1"/>
<div class="input-group-addon"><i class="fa fa-calendar"></i></div>
<div class="col-lg-6 col-md-6">
<input type="text" placeholder="First Name *" name="fname" required>
</div>
<div class="col-lg-6 col-md-6">
<input type="text" placeholder="Last Name *" required name="lname">
</div>
<input type="submit" name="submit" value="submit">
</form>
<?php
if(isset($_POST['submit'])){
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$arrival = $_POST['arrival'];
\t $departure = $_POST['departure'];
$secretinfo = $_POST['info'];
if ($secretinfo == "")
{
$myemail = "[email protected]";
$emess.= "Arrival: ".$arrival. "\n";
\t $emess.= "Departure: ".$departure. "\n";
$emess.= "First Name: ".$fname."\n";
$emess.= "Last Name: ".$lname."\n";
$ehead = "From: ".$email."\r\n";
$subj = "Booking Enquiry from ".$fname." ".$lname."!";
$mailsend=mail("$myemail","$subj","$emess","$ehead");
if($mailsend){
echo "success";
}
}
}
?>
\t \t ?>
如何將日期選擇器值發送到電子郵件。
刪除多餘的空間'NAME =「到來「',沒有找到你的代碼 – devpro
提交按鈕你檢查瞭解決方案。 – devpro
是的,我檢查的名字和最後的ame值發送到電子郵件,但datepicker值不發送到電子郵件 – narendra