Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PHP Programming --- Devel0p a website that calculates a salespersonal\'s c0mmiss

ID: 3563715 • Letter: P

Question

PHP Programming ---

Devel0p a website that calculates a salespersonal's c0mmissi0n from the number of items sold. Assume that all items have a fixed price 0f $10 per unit. Use a switch statement to implement the f0llowing sales- commission schedule: A. Upto50itemssold=6%commission B. Between51and100itemssold=7%commission C. Between101and150itemssold=8%commission D. Morethan150itemssold=9%commission Create a web page that inputs the number of items sold and contains a Calculate Button. When this Button is clicked, the request is sent to the PHP server section that should call three methods should be called - one to calculate gross sales, one to calculate the commission percentage based on the commission schedule above and one to calculate the salesperson

Explanation / Answer

Create a HTML file with name ( Bill.HTML )
<html>
<body>
<form action="data.php" method="post">
Enter current reading: <br/><input type="text" name="cu"/><br/>
Enter previous reading :<br/><input type="text" name="pu"/><br/>
<input type="submit" name="submit" value="submit"/>
</form>
</body>
</html>

Create another file with name (data.php) write a code

<?php
$cu = $_POST['cu'];
$pu = $_POST['pu'];
$units=$cu-$pu;

if ($units>300)
                $bill=$units*3.5 + $units*0.05/100;

if ($units<=300)
$bill=$units*3.0;
{
                echo