Hi
I have 3 dropdown menus for the date. One for the day, one for the month
and one for the year. I am passing these as variables by using:
however, these are strings. I want to be able to make
$fday and $fmonth and $fyear
into a date type and then be able to
make date comparisons with
$tday and $tmonth and $tyear
Is there a way that I can do this. The way I have tried is by casting the 3
variables into int. And then concatenating them. But I am getting problems
with it. There must be an easier way.
Can anyone help me please?
I have 3 dropdown menus for the date. One for the day, one for the month
and one for the year. I am passing these as variables by using:
PHP Code:
$fday = $_POST["fromdate"]["mday"];
$fmonth = $_POST["fromdate"]["mon"];
$fyear = $_POST["fromdate"]["year"];
$tday = $_POST["todate"]["mday"];
$tmonth = $_POST["todate"]["mon"];
$tyear = $_POST["todate"]["year"];
$fday and $fmonth and $fyear
into a date type and then be able to
make date comparisons with
$tday and $tmonth and $tyear
Is there a way that I can do this. The way I have tried is by casting the 3
variables into int. And then concatenating them. But I am getting problems
with it. There must be an easier way.
Can anyone help me please?
Comment