Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Create a database called gallery to setup a database user accordingly; Grant all privileges to dealer on the gallery database. dealer must be able

1. Create a database called gallery to setup a database user accordingly; Grant all privileges to dealer on the gallery database. dealer must be able to perform operations on the gallery database from localhost.

USER: dealer, PASSWORD: dealer123

2. Construct two tables: one is called artists and the other is called arts.

i. The names of the fields should be the same as specified above.

ii. You will choose the appropriate data type for each field.

ii. artID is the primary key for arts table. artistID is the primary key for the artists table.

iv. Since arts table will rely on artists table for the artist name, so make sure that to limit deletion of the artist entry only when that particular artistID no longer exists in the arts table. Based on this, set your foreign key constraint accordingly.

v. Do not auto-increment your primary keys.

vi. Create the database with all lowercase characters gallery

vii. Create the tables with all lowercase characters arts & artists

viii. Name the columns exactly as described above. This format is called camel case.

ix. Create the database user and password with all lower case characters.

3. Write a PHP program called read.php to read artists.txt and arts.txt into the corresponding tables and then design and implement a web page called search.html according to the following criteria:

-Create a search input that can independently accept these search criteria:

--artist ID

--partial artist name

--complete artist name.

--Display all artist ID and artist name pair.

--Display all art works for a given artist.

--Display the value of each art work for a given artist.

--Calculate and updated the total value of all art works for a given artist as necessary.

4. Write a PHP program called display.php to display the above search results in an html table. display.php will handle the form processing for search.html.

-In the table footer, include both hyperlink back to search.html and add.html. (Search | Add). See Part 7.

-Add an Update column to the end of the html table. This update column must include Edit and Delete hyperlinks (Edit | Delete).

-edit.php is the URL for the Edit hyperlink. See Part 5.

-delete.php is the URL for Delete hyperlink. See Part 6.

-These hyperlinks will allow you to edit or delete the respective values in from record displayed. When creating these links, include Artist ID and Art ID as query string variable to the hyperlinks.

5. Write a PHP program called edit.php to perform an edit. This update form is to be rendered by edit.php. Use $_GET variable to retrieve the values passed by the query string in order to retrieve necessary values to populate the Update form with the corresponding values from the display output.

The Update form should display the following fields with their existing values:

Artist Name

Art Name

Art Value

All fields are required to have values on form entry to perform update. None may be empty.

In the html output produced by edit.php, include a hyperlink back to search.html.

Upon successful update, redirect back to search.html. Research the header() function to perform redirect.

6. Write a PHP program called delete.php to perform a delete. Use $_GET variable to retrieve the values passed by the query string in order to process the deletion.

Upon successful delete, redirect back to search.html.

7. Design and implement a web page called add.html according to the following criteria:

? Utilize the following fields in your form to insert the record:

Artist Name

Art Name

Art Value

All fields are required to have values on form entry to perform insert. None may be empty.

On add.html, include a link back to search.html.

8. Write a PHP program called add.php to process the insert request which upon successful insert, should redirect back to search.html. Style your html using an external CSS file called general.css.

*Incorporate exception and error handling as reasonably necessary.

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

Step: 3

blur-text-image

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago