i have a problem such as:
i have make a javascript calendar to choose date in textbox and show format only ( dont have time, only date) dd/mm/yyyy for ex: 10/12/2007
and this id my form:
< input type=text name= datechoose>
After choose date , i submit ( Server time : 10/12/2007 03:00 PM), get value in text box and use function changedate to convert format 10/12/2007 into number: 654674132 and save in database and show it
function changedate ($input)
{
$a=implode("/", $input);
$day = $a['0'];
$month = $a[1];
$yeah = $a[2];
$date= mktime(0,0,0,$month,$day,$year);
return $date;
}
$date = $_POST['datechoose'];
$date=changedate($date);
When i show $date in databse follow format : ('d/m/Y H:s)
(10/12/2007 12:00 AM)
why is (10/12/2007 12:00 PM) that not is (10/12/2007 3:00 PM).
Tell me method to can changedate into datechoose and time submmited
Thanks Mr, and Mss