Seriously....so....confused....
mktime, strftime, date.... I don't know which to use and I think reading the manual for each of these has me more confused than ever. :queasy:
Via a form, a user can enter a date, which is formatted like yyyy-mm-dd. That part is fine. Then, they select the hour in one select box, the minutes in another, and the period of day in a third. I'm trying to figure out how to format it into yyyy-mm-dd hh:mm:ss for storage in mysql.
The hours that the user select is 12-hour format, and unless I'm misunderstanding something, I need to store the time in a 24-hour format in mysql.
So, how can I accomplish that?
I'm leaving out all of the validation and such to simplify this post, but assuming my script looks like this:
$inputteddate = $_POST['date']; // 2008-01-01
$inputtedhour = $_POST['hour']; // 11
$inputtedmin = $_POST['minutes']; // 45
$inputtedperiod = $_POST['period']; // PM
Really, I think most of my confusion is how to take 11:45 PM and convert it to 24-hour format, but I could be really confused and not even realize how confused I actually am.... 😃