php Currentage not define in the scope
<p>I am quite new to php. Can somebody please guide me what is wrong with the code.     </p>

<pre><code>&lt;?php
    if(!isset($_POST['submit']) || $_POST['submit']!="calculate")
    {
       $_POST['Contrib']="";
       $_POST['Currentage']="";
       $_POST['Retireage']="";
       $Total =0;
       $AnnGain =7;
    }else{
       $AnnGain = $_POST['AnnGain'];
       $Years = $_POST['Retireage'] - $_POST['Currentage'];
       $YearCount = 0;
       $Total = $_POST['Contrib'];

       while ($YearCount &lt; $Years)
       {
           $Total = (round($Total) *(1.0 + $AnnGain/100) +
               $_POST['Contrib']);
           $YearCount = $YearCount+1;

       }

    }
    ?&gt;

           &lt;b&gt;A Retirement Saving calculator&lt;/b&gt;


           &lt;form action="&lt;?php echo $_SERVER['PHP_SELF'];?&gt;" method="post"&gt;
           &lt;p&gt; Your age now
           &lt;input type="text" size = "5" name = "Currentage"
                  value="&lt;?php echo $_POST['Currentage'];?&gt;"&gt;
           &lt;p&gt; The age at which you want to retire
           &lt;Input type="text" SIZE="6" name="Retireage"
                  value="&lt;?php echo $_POST['Retireage']; ?&gt;"&gt;
           &lt;p&gt; Annual Contribution
           &lt;input type="text" size = "15" name = "Contrib"
                  value="&lt;?php echo $_POST['Contrib'];?&gt;"&gt;
           &lt;p&gt;Annual Return
           &lt;input type = "text" size = "5" NAME = "AnnGain"
                  value="&lt;?php echo$AnnGain; ?&gt;"&gt;
           &lt;BR&gt;&lt;BR&gt;
           &lt;p&gt;&lt;b&gt;Nest Egg &lt;/b&gt;: &lt;?php echo $Total; ?&gt;
           &lt;p&gt;&lt;Input type = "submit" Name = "submit" value = "calculate"&gt;
           &lt;/form&gt;
</code></pre>
