What's the easiest way to set out the time?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kral_majales
Forum Commoner
Posts: 36
Joined: Wed Nov 24, 2004 2:47 pm
Location: Dorset, UK

What's the easiest way to set out the time?

Post by kral_majales »

Hi all,

I'm making an online booking system, where I create available booking slots, and people come along and select which bookings they would like to use.

I'm having problems trying to work out the best way to make my booking creation form - I'd like to create a dropdown list of dates, months, and times... but what format does the information have to be in to pass it accurately from php to mysql?

How do I convert the date and times based on what people select into data that is compatiable with date fields on the database?

K
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

http://php.net/time
http://php.net/date
http://php.net/strtotime

those should give you an idea of what you need
kral_majales
Forum Commoner
Posts: 36
Joined: Wed Nov 24, 2004 2:47 pm
Location: Dorset, UK

Post by kral_majales »

hey thanks, i've got it all sorted out now. cheers! :D

K
Post Reply