Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    adding days to a drop down

    Hi,

    I have this code

    PHP Code:

    $sm 
    $_POST['sent_m'];
    $sd $_POST['sent_d'];
    $sy $_POST['sent_y'];
    $sent "".$sy."-".$sm."-".$sd.""
    that comes from 3 drop down boxes (month, day, year)

    how do i take that info and add 30 days to it?

    thank you

  • #2
    Regular Coder
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    217
    Thanks
    0
    Thanked 1 Time in 1 Post
    PHP Code:
    <?php
    $c_day 
    $_POST['sent_d'];
    $c_month $_POST['sent_m'];    
    $c_year $_POST['sent_y'];

    echo 
    "Date Entered: " $c_day " / " $c_month " / " $c_year ".";
        
    // add 30 days
    $k_date date("d / m / Y"mktime(000$c_month$c_day 30$c_year));
        
    echo 
    "<br><br>";
    echo 
    "End Date: " $k_date;
    ?>

  • #3
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanx alot!


  •  

    Posting Permissions

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