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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:30, juliannxkim
Which group on the home tab allows you to add shapes to a powerpoint slide?
Answers: 1
image
Computers and Technology, 22.06.2019 10:30, Twitches
This first part of the film shows the early history of motion pictures. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theatre productions? explain. in the scene where don is going to the party (starting at time code 14: 51), we see a street scene as he first rides with cosmo and then with kathy. what aspects did the filmmaker include to make the scene look and feel like don, cosmo, and kathy are riding in a car on a street? think about elements such as scenery, sound, props, lighting, and so on. a "talkie" picture is shown starting around time code 21: 15. how does the audience in the film react to the "talkie"? what influence do audiences have on film and theatre performances? how do film and theatre actors influence audiences? in the musical scene with cosmo (starting at time code 27: 00), how does the actor use props? what is the result? do you think the use of props effectively fulfilled the artistic vision for this musical number? why or why not?
Answers: 1
image
Computers and Technology, 23.06.2019 02:30, hailey5campbelp7d1c0
What is the power dissipated by a resistor with a current of 0.02 a and a resistance of 1,000 ? a. 200 w b. 20 w c. 0.4 w d. 4 w
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, ladawnrowles005
The option enables you to modify a slide element in most presentation applications.
Answers: 2
You know the right answer?
PHP Programming

You will write a PHP program to calculate the payment receipt for renti...

Questions in other subjects:

Konu
Mathematics, 16.06.2020 16:57
Konu
History, 16.06.2020 16:57
Konu
Mathematics, 16.06.2020 16:57
Konu
Health, 16.06.2020 16:57