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.....

Reply via email to