First I take the input in as:
<input id="orderTimeOne" name="orderTimeOne" type="time" value=<?php if(isset($_SESSION['orderTimeOne'])) { echo '"' . $_SESSION['orderTimeOne']='' . '"';} ?>>
So the id is orderTimeOne
and the type is time
----------------Then on the next page:--------------------
if statement containing passed variables from session
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION['orderTimeOne'] = $_POST['orderTimeOne'];
}
if($_SESSION['orderTimeOne'] == '' || !isset($_SESSION['orderTimeOne']))
{
$timeOne=0;
} else {
$timeOne=1;
}
----------------Then on the next page:--------------------
<?php
$orderTimeOne = $_SESSION['orderTimeOne'];
?>
<p id="FirstTime" style="text-align: right;"><?php echo $orderTimeOne;?> </p>
This echo's out the input of the date the user put from the starting page.
Now this is the final page before the user presses confirm and it calls upon a onclick
JS function. Which does this all in one function:
function() {
var Booking = Parse.Object.extend("Booking");
var firstOrderTime = document.getElementById('FirstTime').innerHTML;
booking.save ({
firstOrderTime: firstOrderTime
});
}
firstOrderTime
is the variable string set in Parse
Keep in mind this all works in Safari as well and FireFox, just not Chrome.