php date will not insert into mysql database
- by Piers Blinco
this is a strange one.
I have a date, that is converted to mm-dd-yyyy
when posting it to mysql i have re-ordered it to yyyy-mm-dd
but yet it still will not insert
$date = date("Y-m-d", strtotime($_POST['leaving_date']) );
any advice?
Cheers
EDIT
The actual query:
mysql_query("INSERT INTO booking_info (customer_id, booking_ref, date_of_travel) VALUES (".mysql_real_escape_string($_POST['customer_id']).", ".mysql_real_escape_string($rnd).", ".mysql_real_escape_string($date).")");