function CreateDate i made doesnt work?

From: Date: Tue, 06 Apr 2004 13:18:45 +0000
Subject: function CreateDate i made doesnt work?
Groups: php.general 
Request: Send a blank email to php-general+get-182463@lists.php.net to get a copy of this message
i have the function i made: function CreateDate($day, $month, $year) { if(!empty($day) && !empty($month) && !empty($year)){ //convert $day, $month, and $year into a valid timestamp $time= strtotime($day, mktime(0,0,0,$month,1,$year)); $time=date("YmdHis", $time); return $time; } else { return false; }} ?> now when i try to use itlike this: //$startingday $startingmonth and $startingyear are all form //variables $_SESSION['add']['start_date']=CreateDate($startingday, $startingmonth, $startingyear); //now echo the date: assuming lets say we used 10/5/2004 //in the original form: Start Date: <?echo date("l F j Y", $_SESSION['add']['start_date']);?> my output ends up being Monday January 18, 2038 no matter what i try to use in the forms.....

« previous php.general (#182463) next »