i keep getting this error
Fatal error: Cannot redeclare datecheck() (previously declared in /home/username/public_html/folder/thanks2.php:238) in /home/username/public_html/folder/thanks2.php on line 238
the function that i am using for this error to show up is:
PHP:
function datecheck($intext) {
$theresults = ereg("([0-9]{1,2})-([0-9]{1,2})-([0-9]{4})", $intext, $trashed);
if ($theresults) { $isamatch = "match"; } else { $isamatch = "No - NOT A MATCH"; }
echo("\"$intext\" $isamatch<br>\n");
}
i have also tried
PHP:
function datecheck($expire)
{
// check an email address is possibly valid
if (ereg("([0-9]{1,2})-([0-9]{1,2})-([0-9]{4})", $expire))
return true;
else
return false;
}
whats wrong with it, how can i get it to work without it giving me this error? can someone please help me out in getting this to work?
thanks