add days on CURDATE() funcion in PHP
<p>I'm currently trying to add days to the current date function in PHP but I'm not really sure how. Below is my code..</p>

<pre><code>function due(){
    $it=$_POST['item_name'];
    $ab="select duration from item where item_name='$it'";
    $cd=mysql_query($ab);

    while($mn=mysql_fetch_array($cd)) {
        $interval=$_POST['duration'];
        $due='DATE_ADD(CURDATE(),INTERVAL'.$interval.'DAYS )';

        $gh=$_POST['request_name'];
        $ij=$_POST['requestid'];
        $ef="insert into request (due_date) values ('$due') where request_name='$gh' &amp;&amp; requestid='$ij'";
        $kl=mysql_query($ef);
    }
}
</code></pre>

<p>DURATION is the number of days I would like to add to the current date</p>

<p><em>*</em> I'll elaborate my question further</p>

<p>DURATION is inserted into a table (TBL_A)
CURDATE() value is inserted in another table (TBL_B)</p>

<p>I would use the FUNCTION DUE() to select DURATION and add to the CURDATE() as DUE_DATE
DUE_DATE is inserted into TBL_B</p>

<p>DURATION varies on the item_name in TBL_A</p>

<p>DUE_DATE is selected in another program</p>
