Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    NOLA
    Posts
    41

    Combine Date Variables

    I have a simple form passing the date selected from drop downs. In my database the date format is YYYY-MM-DD. I have set the posted variables to $year, $month, and $date. What is the best way to combine these variables to submit correctly to the database? Thanks in advance :-)

  2. #2
    Join Date
    Mar 2004
    Location
    NOLA
    Posts
    41
    Got it..just needed quotes around the variables..

    $eventDate = "$year-$month-$day";

  3. #3
    just so you know, there are a few ways of doing it... i belive

    $eventDate = "$year-$month-$day";
    $eventDate = <<<EOT
    $year-$month-$day
    EOT;
    $eventDate = $year."-".$month."-".$day;

    Wouyld all do it, a lto depends on your 'style' or coding
    Note to self: Add something funny!
    Search is your friend!

  4. #4
    Join Date
    Mar 2004
    Location
    NOLA
    Posts
    41
    thanks for the tips

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •