Hi! I just can't figure out how to let people input a date like "2000-12-21" and save it to database using timestamp ?
Can you help ?
I've said it before, and I'll beep on saying it: Manuals are your friends!
mktime
(PHP3 , PHP4 )
mktime -- Get UNIX timestamp for a date
Description
int mktime (int hour, int minute, int second, int month, int day, int year [, int is_dst])
Hi Vincent
I totally agree - I always found the www.php.net online manual very useful, since it has user hints and tips on each subject too.
Just check out the 'date and time functions' section of the manual for even more ways of converting dates.