Hi there,
I want to check that a date is entered in the correct format; yyyy/mm/dd.
Ive written this function:
function valid_date($date)
{
if (ereg("^[+0-9]+/[+0-9]+/[+0-9]+$", $date))
{
return true;
}
else
{
return false;
}
}
How do I make sure that the year bit contains four characters and the day and month two?
Cheers, Jo