Pass datepicker value to PHP & MySQL

Pass datepicker value to PHP & MySQL

Hi,

I have the attached new_leave.php file which has dateFrom and dateTo datepickers.

When submitting the form I don't get the correct MySQL format therefore it's throwing an error.

The value I get is something like this:


1423900800


that's when I try:

  1. echo $timestamp = strtotime($_POST['dateFrom']);

can you help please...