HTML / PHP表单 - 输入类型“日期”

i am struggling to pull through a "Date" input type on my php form processor to email. I've tried various coding but cannot get the value to show on email :-(

everything else works - assistance would be greatly appreciated!

$name = $_POST['name'];
$visitor_email = $_POST['email'];
$reference = $_POST['reference'];
$date = $_POST['date'];
$amount = $_POST['amount'];

$email_from = 'my email here';
$email_subject = "Online Payment Notification";
$email_body = "You have received an online payment notification from $name.
".
"please see details below:


Name: $name
Email: $visitor_email
Reference#: $reference
Date: $date
Amount: £$amount
";

$to = "my email here";
$headers = "From: $email_from 
";
$headers .= "Reply-To: $visitor_email 
";
mail($to,$email_subject,$email_body,$headers);

[The] Date is showing as YYYY-MM-DD but i want it to show as DD-MM-YYYY

To change the format of the date from YYYY-MM-DD to DD-MM-YYYY, simply replace this line of code:

$date = $_POST['date'];

with:

$date = date("d-m-Y", strtotime($_POST['date']));