Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is created in php 1) Create a web page containing images for movies available for rent (at least 8 movies), so that each time

This is created in php

image text in transcribed

1) Create a web page containing images for movies available for rent (at least 8 movies), so that each time you visit the home page, you see a different order of movies on the page. (Note: You can use your previous home page (from Assignment 2) if you would like, or create a new one. The movie images are required, all other information is optional.) (12 points) 2) The rental price for each movie ranges between $1.99 to $7.99. Create an associative array with the movie name as the key and the associated rental price as the value. Display to the browser the "key" - "value" pairs from the array using a foreach or while loop. (5 points) Sort the array according to the rental price in ascending order. Display the sorted array using the print_r() function, with proper formatting. (5 points) Calculate and display the average rental price for a movie. (3 points) Display these results on the same page. 3) Certain words are not allowed on the website. When a user submits a review (using the User Review Form from Assignment 2), you need to check the review for the following words, and replace the words with generic characters (such as, "!@#$%"). The banned words are: "stupid, idiotic", "rubbish" and "horrible". Write a function that checks the submitted user review for these words, replaces them with a generic string, and outputs the censored user review to the browser. 1) Create a web page containing images for movies available for rent (at least 8 movies), so that each time you visit the home page, you see a different order of movies on the page. (Note: You can use your previous home page (from Assignment 2) if you would like, or create a new one. The movie images are required, all other information is optional.) (12 points) 2) The rental price for each movie ranges between $1.99 to $7.99. Create an associative array with the movie name as the key and the associated rental price as the value. Display to the browser the "key" - "value" pairs from the array using a foreach or while loop. (5 points) Sort the array according to the rental price in ascending order. Display the sorted array using the print_r() function, with proper formatting. (5 points) Calculate and display the average rental price for a movie. (3 points) Display these results on the same page. 3) Certain words are not allowed on the website. When a user submits a review (using the User Review Form from Assignment 2), you need to check the review for the following words, and replace the words with generic characters (such as, "!@#$%"). The banned words are: "stupid, idiotic", "rubbish" and "horrible". Write a function that checks the submitted user review for these words, replaces them with a generic string, and outputs the censored user review to the browser

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

Describe the various types of research designs.

Answered: 1 week ago

Question

1. Describe the types of power that effective leaders employ

Answered: 1 week ago