Question
PHP & SQL Create an initial HTML page titled manager.html with a button labeled Add Film. This button should link to a file titled add_film.html
PHP & SQL
Create an initial HTML page titled manager.html with a button labeled Add Film. This button should link to a file titled add_film.html.
On add_film.html file. It should have a form with text boxes to input the following information about a new flim: title, description, release_year, language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features. rating should be a drop down box with only the following values: G, PG, PG-13, R, NC-17. special features should be a drop down box with only the following values: Trailers, Commentaries, Deleted Scenes, Behind the Scenes. You do not need to do error checking on the input (i.e. verify that cost is a number), but be aware that if you dont enter the correct data type your query may fail. So use good data for testing. You will need two buttons on this page, save and cancel. The save button will need to insert the employee information into the database as described below (by linking to a file titled add_film.php), display a message stating whether the query was successful or not, and display button to return to the manager.html page. The cancel button should return to themanager.html page.
*** when creating the add_film.php file. Here is a sample query that does the work:
INSERT INTO sakila.film (title,description,release_year,language_id,rental_duration,rental_rate,length,replacement_cost,rating,special_features) VALUES ('1st Grade FBI Agent','An undercover FBI agent must pretend to be a 1st grade teacher to catch the bad guy',2014,2,5,4.99,123,20.99,'PG-13','trailers');
Use this query above as a guide to use inputs from the $_POST array to insert into the database. The add_film.php page should display success if the film was added, or an error message if the insertion failed. You should also have a button linking back to the manager.html page.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started