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, 23.06.2019 02:30
Which component acts as a platform on which application software runs
Answers: 2
question
Computers and Technology, 23.06.2019 17:30
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2ă—, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5ă— slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Ramona enjoys her job because she is able to kids in an after school program. the work value ramona feels strongest about is a. leadership b. risk c. independence d. work with people select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
George heard about the benefits of a data warehouse. he wants to try implementing one for his organization. however, he is afraid that transferring data to the data warehouse will affect transaction time. which element ensures that transactions are not affected when moving data to a warehouse? when data is transferred to a data warehouse, the a area frees the source system to continue transaction processing.
Answers: 2
You know the right answer?
PHP Programming

You will write a PHP program to calculate the payment receipt for renti...
Questions
question
Mathematics, 17.05.2021 23:30
question
Mathematics, 17.05.2021 23:30
question
Biology, 17.05.2021 23:30
question
World Languages, 17.05.2021 23:30
question
Mathematics, 17.05.2021 23:30
question
Mathematics, 17.05.2021 23:30
Questions on the website: 13722363