PHP/MYSQL Database - Date issue

Good Afternoon,

I have set up a form on my site that enters into a MYSQL database.

I have the day/month/year/hour/min in separate fields.

Am I going about this the wrong way by setting separate fields or should I use one of the date values?

I am new to PHP and databases so, please advise of the best way to do this in order to allow for easy querying.

Thanks,

Hi there,

Try using a field with type “DATETIME”.

Thanks for your reply.

Could you tell me how I would get the data from my form to the ‘DATETIME’ field.

Sponsor our Newsletter | Privacy Policy | Terms of Service