Hi,
Just use my above defined code and if you make it a function then it will better to you and use any where.
function DateInSec($stdate)
{
$exp_stdate=explode("/",$stdate);
$stday=$exp_stdate[0];
$stmonth=$exp_stdate[1];
$styear=$exp_stdate[2];
$newstdate = mktime(0, 0, 0, $stmonth, $stday, $styear);
return $newstdate;
}
Now use this method in your script
$date_start1 ="25/5/2006";
$date_end1 ="27/5/2006";
$date_start =DateInSec($date_start1);
$date_end =DateInSec($date_end1 );
if($date_start > $date_end)
{
$error_message['date_error'] = 'Date End cannot be earlier than Date Begin';
}