I have a page that builds what I believe is a UNIX Timestamp, in the following format:
My PHP script fails to insert the date into MySQL if a date that doesn't exist, such as February 31st, is selected. Does PHP have a built in function to do this kind of validation or do I have to create my own function?
$invoiceTimeStamp = $_POST['invoiceYear'];
$invoiceTimeStamp .= $_POST['invoiceMonth'];
$invoiceTimeStamp .= $_POST['invoiceDay'];
$invoiceTimeStamp .= "000000"; // zero hour, minute, and second