Am using 2 calenders in my form:
From:<input name="date" type="text" id="date" readonly/>
To:From:<input name="datem" type="text" id="datem" readonly/>
and i did so to get the days
$s=split("[/]",$date);
$e=split("[/]",$datem);
for($i=0;$i<=count($s);$i++)
{
$year1=$s[0];
$mon1=$s[1];
$day1=$s[2];
}
for($i=0;$i<=count($e);$i++)
{
$year2=$e[0];
$mon2=$e[1];
$day2=$e[2];
}
and i want to calculate how many days he choosed??
i did so
echo $day=$day2-$day1;
but the problem,if he choose for example
From:2007/12/30
to:2008/12/09
i will have -21days
can anyone help me???