[thelist] 2 into 1, will it go?

David Bindel dbindel at austin.rr.com
Sun Jul 13 16:23:27 CDT 2003


<snip>
I have a series of PHP generated drop down menus, one for
date (today's up to 90 days) and time based on 24 hours,
these go into MySQL as DATE and TIME instead of the variables
I was using before, my problem now is trying to combine 2
elements from my form into one variable.
</snip>

The correct format for a DATETIME value is YYYY-MM-DD hh:mm:ss.

Therefore, all you need to do to combine the date and time elements of
your form is this:

$datetime = $_REQUEST['date'] . ' ' . $_REQUEST['time'];

HTH,
David

--
    David I. Bindel
  Website Development
 dbindel at austin.rr.com
  www.davidbindel.com



More information about the thelist mailing list