Hi. I'd like to add time (and no date, and not a timestamp) data to a field in MySQL through a PHP form. I've been having problems, as the date is also included. But I only want the time (I want to be able to sort the data by the time, and I think it was adding today's date along with the time, so if I enter the data on 5 different days, it won't sort correctly).

PHP Insert Code:

MySQL field:
Type: INT
Length/Values: 10
Default: None
Attributes: Unsigned
Everything else empty

Can anyone help with:
1) what should the php insert code be
2) what the field type, attributes, length/values, etc should be


Recommended Answers

All 2 Replies

Thanks Catherine. I'll play around with that and see if it works for me.

Be a part of the DaniWeb community

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