juliancaldwellomaha
asked on
Codeignitor Date formatting Check (prior to submission)
I need to allow the user to submit a date and time mm/dd/yyyy hh:mm on a form. I would like to not use javascript to validate the entry is valid, prior to submitting to the database.
I know about the date validation in CI; however, I do not see anything for date and time together. Does anyone have a good example of using a standard input box, taking the submission to the controller, validating that the data is a valid date and time and then submitting to the database?
Any help would be greatly appreciated. I have a function that converts the date to the approriate strings for mktime in PHP, but maybe I need to check via a regular expression? Thoughts? Suggestions? Examples? All greatly appreciated.
I know about the date validation in CI; however, I do not see anything for date and time together. Does anyone have a good example of using a standard input box, taking the submission to the controller, validating that the data is a valid date and time and then submitting to the database?
Any help would be greatly appreciated. I have a function that converts the date to the approriate strings for mktime in PHP, but maybe I need to check via a regular expression? Thoughts? Suggestions? Examples? All greatly appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.