Using javascript, a field in an html form is formatted for time. When the user types in 344, the field formats onblur to 3:44. This field is then echoed in PHP an appears properly formatted.

However, in the MySQL database it is inserted into, it appears as only "3". Everything after the colon is lost. Does this have something to do with MySQL?

Recommended Answers

All 2 Replies

Show the table defnition. In which field are your data stored? Presumably an integer field. Alter it to a time field.

It was an integer field.. Not sure how I missed that. Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.