Really need some help on that one
Posted: Wed Dec 22, 2004 4:30 am
Sorry to bother you with this again, but I am blocked for the last 2 days.
PHP and SQL.
I display my date from SQL in a form for user to update like that
<input type="text" name="date" size="20" value="<?php echo date("d/m/Y",strtotime($date));?>">
When user post this value I get it back that way
$date = $_POST["date"];
$date = date('Y-m-d h:i:s',strtotime($date));
now if in my form i enter a date like 15/12/1999, this updated properly
BUT
if i enter a date liuke 15/12/2004, the DB is update with the value
12/03/2005 12:00:00
something i am missing there???
thanks in advance
s
PHP and SQL.
I display my date from SQL in a form for user to update like that
<input type="text" name="date" size="20" value="<?php echo date("d/m/Y",strtotime($date));?>">
When user post this value I get it back that way
$date = $_POST["date"];
$date = date('Y-m-d h:i:s',strtotime($date));
now if in my form i enter a date like 15/12/1999, this updated properly
BUT
if i enter a date liuke 15/12/2004, the DB is update with the value
12/03/2005 12:00:00
something i am missing there???
thanks in advance
s