View Full Version : php date to mysql date

08-16-2008, 01:05 PM
Ok guys, im going mad over the simplest of things.

I have an entered string from the user(it uses a javascript pop-up calendar, and they cant edit unless they use the calendar so its safe...to an extent)

What i want to then do is get the posted form data (piece of cake) and explode it(piece of cake) and put it into a mysql date field.
for some reason when i try to do this using php's mktime it will just enter 0000:00:00

i must be doing something wrong, i just dont know where.

i also need to be able to create the current timestamp in php(piece of cake) and then put that straight into the database, but for some reason that is also coming out like 0000:00:00 00:00:00

somebody please just say "you idiot, you do it like this..."