Hi, I have got a really annoying problem here. I'm trying to match $last_top_up with a valied date format, i.e. dd/mm/yyyy. At the moment I'm using;
if (!eregi("^[1-31]+/[1-12]+/[2000-2010]$",$last_top_up)) {
echo "The last update value you set is in the incorrect format, it needs to be like: day/month/year, i.e. 21/3/2002";
exit;
}
However, this keeps returning a false value. Is there something really obviouse I'm misisng here?
Any help would be much appreciated.
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
// check for the format of the last top up... if (!eregi("^[1-31]+/[1-12]+/[2000-2010]$",$last_top_up)) {
echo "The last update value you set is in the incorrect format, it needs to be like: day/month/year, i.e. 21/3/2002";
exit;
}
However, this keeps returning a false value. Is there something really obviouse I'm misisng here?
Any help would be much appreciated.
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!