Re: Adding Time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 27, 2010 at 8:41 PM, Gary <gwpaul@xxxxxxx> wrote:

> [...]
>        <?php
>
>
>  $pay_date=($_SESSION['pay_date']);
>
>
>  $loan_length=($_SESSION['loan_length']);
>
> $orgDate=($_SESSION['pay_date']);
> $mth=($_SESSION['loan_length']);
> function add_date($orgDate,$mth){
>  $cd = strtotime($orgDate);
>  $end_date = date('Y-m-d',
> mktime(0,0,0,date('m',$cd)+$mth,date('d',$cd),date('Y',$cd)));
>  return $end_date;
> }
> echo $orgDate ."<br />";
> echo $end_date ."<br />";
> echo $pay_date ."<br />";
> echo $loan_length;
> ?>


You access form element values via the $_POST superglobal, why are you using
$_SESSION?

http://php.net/manual/en/reserved.variables.post.php

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux