PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I check if a date entered exists?


To check for a valid date is something that is quite hard to do... which is why PHP has handily created a function that does it for you.

It is very useful, easy to use and can save a lot of hassle with problems in your registration forms and so on when people enter a date of birth that doesn't exist.

But not many people call it. If you need to do any sanity checking on dates on your web forms then it is worth passing a date through this function as one of your checks.

The function is called checkdate() and takes the month, day, year as parameters.

Comment on this Question and Answer >>>

ASK A QUESTION

More other PHP Questions

How can I stop my PHP script timing out?

How do I access or format the date?

Can I spellcheck my text using PHP?

I have lots of if else logic - is there another option?

How do I add comments to my PHP script?



Custom Search