Using WebMatrix, choose either empty PHP website or empty HTML website as the te
ID: 3778156 • Letter: U
Question
Using WebMatrix, choose either empty PHP website or empty HTML website as the template to create a PHP-enabled website that is made of index.php and proccss.php. index.php: This file collects user input with a HTML form and sends the input data to the second file. The form should create a user interface that describes the primary parameters of a personal loan like below. Principal: Interest Rate: Number of Years: proccss.php: This file first takes user input data from index and displays it. Then it calculates and displays the total payback amount. It should looks like below.Explanation / Answer
index.html
<html>
<body>
<center>
<table>
<form action="process.php" method="post">
<tr>
<td>
Principal</td>
<td>input type="number" name="principal">
</td>
</tr>
<tr>
<td>
Interest Rate</td>
<td><input type="number" name="Interest"></td>
</tr>
<tr>
<td>
Number of years</td>
<td><input type="number" name="number"></td>
</tr>
</table>
<input type="button" value="submit">
</center>
</body>
</html>
process.php
<html>
<body>
<?php
$principal=$_POST['principal'];
$interest=$_POST['interest'];
$number=$_POST['number'];
echo "The principal is" $principal " " </br>
echo "The interest rate is" $interest " " </br>
echo "The loan period is" $number " " </br>
?>
</body>
</html>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.