PHP Menu Driven Application Part – 1

Program 1

<?php  include 'MenuApplication.php'?>
<html>
    <head><title>Factorial Page</title></head>
   <body>
    <center>
        <br><h5>Enter A Number</h4>
           <form method=post action=factorial.php>
                 <input type=text name=txnumber>
                 <input type=submit value=submit name=btnsubmit1>
    </form> 
<?php 
        if(isset($_POST['btnsubmit1']))
        { 
               $n=$_POST['txnumber'];
               $f=1;
               while($n!=0)
               {
                  $f=$f*$n;
                  $n--;
               }
               echo "<font color=blue size=5> Factorial is: ".$f."</font>";
        }     
 ?>
<center>
</body>     
</html>

 

courses
Image

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *