View Full Version : php date time

08-01-2007, 03:22 AM
Im not quite sure on how to display or process this for my site but im realy in need of it......

My problem lies here:

What i want to do is have the user input there own dates and times for their event. I will then process the dates/times and enter into mysql...but this is where im confused.......

Here is an image of the form fields how i want it to look it:


how do i process these using php, and how do i insert it into mysql for future use... how do i select them from mysql when its the current date...

thanks for reading, hope you can help me........

08-01-2007, 04:40 AM
Try using the TIMESTAMP field type in your database:



Len Whistler
08-01-2007, 04:47 AM
I recommend you get a book on PHP/MySQL. This would be a good protect for a first time coder. The date time form would be a pull down select menu generated from a php array of days, months and time. Results then POSTed into the MySQL database, very easy to do this.

Good book is PHP and MySQL For Dynamic Websites by Larry Ullman, which has an example of the pull down menu you need.