I tried inserting a date into a mysql database. but for some reasons it was processing the information before putting it into the database here is my code
define("FRIENDS", "friends");
if (!$update) {
$date = date("m-d-Y");
$q = "INSERT INTO " . FRIENDS . " VALUES ('$friend2', $date, $status)";
}
this is what i see in my database: -2025 instead of 15-05-2015. i seems like its being subtracted.
And when i use
$date = date("m/d/Y");
it divides out, leaving 0.000165425971712158
in my database.