Would the date function for php recognize this code, and convert it to a Date Stamp
$date= date('$_POST["Month1"]/$_POST["Date1"]/$_POST["Year1"]');
?
Your syntax is unclear and not works because of single quotes. Better try with:
$date = date($_POST["Month1"] . '/' . $_POST["Date1"] . '/' . $_POST["Year1"]);
If your post data contains format, like m
, d
, Y
- it's ok. But if you pass date like 4
, 21
, 2014
- date()
will not work. Convert it to timestamp with:
$timestamp = strtotime($_POST["Month1"] . '/' . $_POST["Date1"] . '/' . $_POST["Year1"]);