 <?php 
if(isset($_POST['submit']))
 
{ 
 
 $num1=$_POST['number1'];
 
 $num2=$_POST['number2'];
 
         function hcf($i1,$i2)
 
             {
 
                 if($i2!=0)
 
                   {
 
                     return hcf($i2,$i1%$i2);
 
                   }
 
                  else
 
                   {
 
                    return $i1;
 
                   }
 
             }
 
             
 
 $hcfofnumber=hcf($num1,$num2);   
 
}
?>