ecabrera Posted July 23, 2012 Share Posted July 23, 2012 why do i get this checkdate() expects parameter 1 to be long if(checkdate($month,$day,$year)){ $birthday = mktime(0,0,0,$month,$day,$year); $diff = time() - $birthday; $age = floor($diff / 31556926); if($age <= 13){ //if they do eqaull 13 echo "You must be 13 years old to register"; }else{ //make them login echo "Register"; } } Quote Link to comment https://forums.phpfreaks.com/topic/266137-checkdate/ Share on other sites More sharing options...
xyph Posted July 23, 2012 Share Posted July 23, 2012 Because $month isn't an integer (or equiv)? Use var_dump to ensure it contains what you think it should. Quote Link to comment https://forums.phpfreaks.com/topic/266137-checkdate/#findComment-1363825 Share on other sites More sharing options...
ecabrera Posted July 23, 2012 Author Share Posted July 23, 2012 thanks i was checking the wrong thing Quote Link to comment https://forums.phpfreaks.com/topic/266137-checkdate/#findComment-1363826 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.