subject

PHP Programming

You will write a PHP program to calculate the payment receipt for renting a number of movies, using a conditional structure. Suppose that the rental rate depends on the number of movies rented by a customer at a time. There is a limit of renting a maximum of 20 movies at a time. Conditions:

For the first 2 movies rented, the rate is $5.50/movie.

For the next 2 movies rented, the rate is $4.25/movie.

For the next 3 movies rented, the rate is $3.00/movie.

For any more movies rented (no more than 20), the rate is $2.00/movie.

Hence, if a customer rents 5 movies, two of those will be rented at $5.50, two for $4.25 and one for $3.00, for a total of (2*$5.50) + (2*$4.25) + $3.00 = $22.50.

1) Create a form that asks the customer for his/her name and the number of movies he/she would like to rent. On submit, display the total amount due (shown to 2 decimal places) on the same page.

2) Save the customer’s submitted name in a flat-file called "visitor. txt". You should overwrite this name every time someone submits a name to the form.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:30
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. centurion: a commander in the army of ancient rome. keyword: picture:
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
How do you take a green screen out of the video while editing?
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Which computer tools allow you to communicate with coworkers, family,and friends
Answers: 1
You know the right answer?
PHP Programming

You will write a PHP program to calculate the payment receipt for renti...
Questions
question
Mathematics, 15.10.2021 01:00
question
Mathematics, 15.10.2021 01:00
Questions on the website: 13722363