Forum Moderators: coopster
I am not very knowledgable about time
but if I use instead in mktime () the session value as for ex: $dob_y=$_SESSION['dob_y'];
(Which obviously is declared way above; plus I verified previously their value by echoing them in my "if")
<<<<<
if(isset($_SESSION['dob_m']) && isset($_SESSION['dob_d']) && isset($_SESSION['dob_y']) )
{
$dob_parent=mktime(0,0,0,$dob_m,$dob_d,$dob_y);
echo"parent $dob_parent<p>";
$dob=date('y/m/d',$dob_parent);echo"$dob";
}
else{$dob="";}
>>>>
Then it does not work and echoing
echo"parent $dob_parent<p>"; results in EMPTY
It drives me insane! I went to the manual but cannot find anything
what am I overlooking at?
it is part of a long 1800 lines script
so I even tried by creating a small file as the one posted and do no get it working
but since it works on your machine
I am going to load it to my server test bed
instead of my local XAMP
thanks
$_SESSION['dob_m'] = '5';
$_SESSION['dob_d'] = '5';
$_SESSION['dob_y'] = '2007';
$dob_m = $_SESSION['dob_m'];
$dob_d = $_SESSION['dob_d'];
$dob_y = $_SESSION['dob_y'];
if(isset($_SESSION['dob_m']) && isset($_SESSION['dob_d']) && isset($_SESSION['dob_y']) )
{
$dob_parent=mktime(0,0,0,$dob_m,$dob_d,$dob_y);
echo"parent $dob_parent<p>";
$dob=date('y/m/d',$dob_parent);echo"$dob";
}
else{$dob="";}