hello this is working fine for me but i think it can be more simple can anyone help me with this code for checking the time and date entered by user
function ckeck_date($sug_date, $sug_time)
{
if ($sug_date[0] == NULL)
{
return TRUE;
}
else
{
for ($i = 0; $i < count($sug_date); $i++)
{
if ($this->_totimestamp($sug_date[$i], $sug_time[$i]) < mktime(23, 59, 59, date('m'), date('d') - 1, date('Y')))
{
$x=false;
}
else $y=true;
}
}
if(isset($x))
{
return $x*$y;
}
else return true;
}
Try this, take your date and time