Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-16-2005, 06:49 PM   PM User | #1
grudz
Regular Coder

 
Join Date: Jan 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
grudz is an unknown quantity at this point
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
grudz is offline   Reply With Quote
Old 06-16-2005, 07:10 PM   PM User | #2
Serex
Regular Coder

 
Join Date: Mar 2004
Location: Australia
Posts: 217
Thanks: 0
Thanked 1 Time in 1 Post
Serex is an unknown quantity at this point
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;
?>
Serex is offline   Reply With Quote
Old 06-16-2005, 07:18 PM   PM User | #3
grudz
Regular Coder

 
Join Date: Jan 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
grudz is an unknown quantity at this point
Thanx alot!
grudz is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:08 PM.


Advertisement
Log in to turn off these ads.