Here's my code.
$checkinDate = $_POST['checkinDate'];
$checkoutDate = $_POST['checkoutDate'];
$no_nights = date_diff($checkinDate, $checkoutDate);
My code error:
Warning: date_diff() expects parameter 1 to be DateTimeInterface, string given in C:\xampp\htdocs\lgh-hms\admin\conformation.php on line 19