Aug 28th, 2017, 2:19 PM
(Aug 25th, 2017, 11:10 AM)ramonbps Wrote: So i been trying to get this going calculating time difference of my for form.
Below is my code.
if (isset($_POST["checkin"]) && $_POST["checkout"]) {
$tcheckin = $_post['checkin']; $tcheckout = $_post['checkout'];
$tdiff = date_diff("$tcheckin","$tcheckout")->format("%H:%I:%S");
$_POST["inandout"]=["$tdiff"];
exit;
I am not sure what i am doing wrong.
this is my actually code
PHP Code:
$tcheckin=$_POST["checkin"];
$tcheckout=$_POST["checkout"];
$tdiff = date_diff($tcheckin,$tcheckout)->format("%H:%I:%S");
$_POST["inandout"]=["$tdiff"];
When i remove ->format("%H:%i:%s") the blank page goes away.
Attach is the blank page i get.