this is what im trying to do.
Create an HTML form to collect the following information regarding an automobile rental: Customer First and Last Name Initial deposit Number of days rental Beginning mileage Ending mileage Insurance or no insurance selected Number of drivers (at least one) Based on the information collected, calculate the final rental charge. The following information should be used to perform the calculation: Daily charge for car rental: $30 Each rental gets 100 miles free per day. Every mile over the free mileage is $0.35. If the customer selects insurance, the premium is 10% of the entire rental, including the mileage and driver charges. There is a driver charge of $5 per day for each driver – the first driver is free. The initial deposit should be moved from the final calculated charge that is displayed to the user. The final results should look something like:
and this is what ive done so far but i cant figure out how to correct all of this to save my life…
Welcome to this page! <?php // week 2//int variable
First: Last:
Number of Days:
Deposit:
Start Milage:
End Milage:
Insurance: Yes No I Dont know
Number of drivers: 1 2 3
Php code
Product Cost Calculator .number { font-weight: bold;} <?php // Script 4.2 - handle_calc.php /* This script takes values from calculator.html and performs total cost and monthly payment calculations. */// Address error handling, if you want.
// Get the values from the $_POST array:
$days = $_POST[‘days’];
$deposit = $_POST[‘deposit’];
$endMil = $_POST[‘endMil’];
$starMil = $_POST[‘starMil’];
$response = $_POST[‘response’];
$drivers = $_POST[‘drivers’];// Calculate the total:
$total = 30 * $days;
$total = $total + $shipping;
$total = $total - $discount;// Determine the tax rate:
$taxrate = $tax/100;
$taxrate = $taxrate + 1;// Factor in the tax rate:
$total = $total * $taxrate;// Calculate the monthly payments:
$monthly = $total / $payments;// Print out the results:
print “You have selected to purchase:”;
<span class=“number”>$quantity widget(s) at
$<span class=“number”>$price price each plus a
$<span class=“number”>$shipping shipping cost and a
<span class=“number”>$tax percent tax rate.
After your $<span class=“number”>$discount discount, the total cost is
$<span class=“number”>$total.
Divided over <span class=“number”>$payments monthly payments, that would be $<span class=“number”>$monthly each.?>
any help or guidance would be greatly appreciated… Ive been working on tihs all weekend. and i just cant seem to get it right… Im Dyslexic so that kinda make it harder for me to get it to stick… but i will figure it out soon. i know once i do everything else will be easy to grasp
Thank you