Agree with Tamlin here, checkdate would definitely be the easiest way to go about this.
Secondly a couple of quick pointers:
It's good to declare your variables, however, it means using
brings you nothing, as you just declared a value for it, basically "setting" it, so isset will always be true.
Code:
$todo=$_POST['todo'];
if(isset($todo)
Secondly, if you are checking a string that contains no variables, like
then using single quotes
is better, as when php sees a
it parses it looking for variables.
Hope this helps.