Welcome Guest, Not a member yet? Register   Sign In
strtotime problem!
#2

[eluser]fesweb[/eluser]
Easiest thing is to check the submitted date, using php checkdate():
Code:
if( checkdate($data['month'], $data['day'], $data['year'] )
{
$this->GeneralInfo->birthday = strtotime($date[0] .$date[1] . $date[2]);
}
else
{
$this->GeneralInfo->birthday = ''; // or NULL -- whatever solves your problem.
}
Something like that anyway...


Messages In This Thread
strtotime problem! - by El Forum - 02-16-2009, 09:20 PM
strtotime problem! - by El Forum - 02-16-2009, 10:00 PM
strtotime problem! - by El Forum - 02-17-2009, 04:01 AM
strtotime problem! - by El Forum - 02-17-2009, 04:10 AM
strtotime problem! - by El Forum - 02-17-2009, 06:01 AM
strtotime problem! - by El Forum - 02-17-2009, 11:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB