how to store hour and minute in database table while using mktime() function?
Posted
by
Learner Miz
on Stack Overflow
See other posts from Stack Overflow
or by Learner Miz
Published on 2012-11-12T10:51:39Z
Indexed on
2012/11/12
11:00 UTC
Read the original article
Hit count: 145
php
I am using a form to get the hour and minute using post method and then store it to mysql DB.
Such as :
$hour = $_POST['hour'];
$minute = $_POST['minute'];
** There is no need of date, month and year. I just need to store the hour and minute in a column of a table (ex: exam_time)
Column structure: exam_time time NOT NULL
Now how to store these value into database using mktime() function. I tried but it stores 00:00:00, not the one which I am sending via form.
© Stack Overflow or respective owner