phpstuff Posted October 17, 2013 Share Posted October 17, 2013 What other validations are necessary to make this date picker perfect? The reason I ask is that I received the below error(s) when I entered: (1) Warning: checkdate() expects parameter 3 to be long, string given in /Applications/MAMP/htdocs/PHP_MYSQL/datetime.php on line 37 One or both of the submitted dates was invalid. Set the Start and End Dates for the Event Start Date: (MM/DD/YYYY) End Date: (10/18/eeee) (2) Notice: A non well formed numeric value encountered in /Applications/MAMP/htdocs/PHP_MYSQL/datetime.php on line 37Notice: A non well formed numeric value encountered in /Applications/MAMP/htdocs/PHP_MYSQL/datetime.php on line 52 The starting date must precede the ending date. Set the Start and End Dates for the Event Start Date: (MM/DD/YYYY) End Date: (10/18/2sd4) Link to comment Share on other sites More sharing options...
HartleySan Posted October 17, 2013 Share Posted October 17, 2013 The year (the third) argument to the function must be an integer between 1 and 32,767. No strings are allowed. Here's more information: http://www.php.net/manual/en/function.checkdate.php Link to comment Share on other sites More sharing options...
phpstuff Posted October 17, 2013 Author Share Posted October 17, 2013 Thank you for your response. Do you feel those 2 additional validation steps would make this ready to go to a live site, or are there any other validation steps that would need to be included in order to ensure error-free operation? Link to comment Share on other sites More sharing options...
HartleySan Posted October 17, 2013 Share Posted October 17, 2013 As long as a date is a valid date and the end date is after the start date, that's all that matters, right? Link to comment Share on other sites More sharing options...
Recommended Posts