Hi,

> I had provided a text field for date, so have to
> expect all the different possible entry, 

This is generally a *very* bad idea. If a visitor to your site enters
"4/3/01", do they mean the 4th March or the 3rd April?

I find the best thing to do is provide three drop-downs: one contains
numbers from 1-31, one contains the names of months, and one contains
numbers from 2000 onwards. Using this, it's impossible to enter a date that
could be interpreted in more than one way (although you still can do things
like 31st Feb, so you still need checkdate).

If you absolutely must do this you can always break the date up into
components (split on the delimiter) and pass the components to checkdate().

> When i tried with checkdate() method it needs the
> parametes in (int month,int date, int year). It make
> the code more complex 

Generally it's better to have complex code that works than simple code that
doesn't.

Cheers
Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to