Car Loan Calculator – Php Basic Programming

First we need to create a new PHP file: simplecarloancalculator.php. A PHP file is treated by the web server as a normal HTML file except for the code written inside the PHP tag.

We submit data back to this web page by creating a Car Loan Calculator HTML form.

Price of car: Term: Interest rate: The code above will create a form with three text boxes and a button.

Car price: ___
Term: ___
Interest rate: ___

can be translated as:

When the calculate button is pressed, the data in the text boxes will be sent to the page named: simplecarloancalculator.php (the page we have ready is loaded in our web browser). Our current page simplecarloancalculator.php will be reloaded and we will access the data entered in the form in an array called $_POST.

We use $_POST to use the data entered in the car price text box.[carPrice], where the name used in the form above is carPrice. Since we are actually using…

Leave a Reply

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