Class Exercise:  MySQL Application Programming Interface

Refer to the data files link and the following definition for the questions that
follow:  Item { id(primary key), article, cost };

Write HTML and PHP scripts with embedded SQL for the database operations in 1 - 7.
1.  Create a login form to collect a hostname, username, password, and database name
    that are to be used by an API when connecting to a MySQL database.  The action
    performed is to post these values to a PHP script for processing by the following
    application components.


2.  Code a PHP script that would create an Item table in the user's database.


3.  Create an HTML form to capture item data and a PHP script to insert this data
    into the Item table.  Extensive validation is not required but the data should
    be of the correct type and the user should be notified if the insert failed.


4.  Given that a user is to supply an Item id, create a form to capture a value
    and script to delete an Item row with this id.  Provide user feedback as to
    the success or failure of this insert attempt.


5.  Prepare a form to accept an id and either an article value or cost value for
    the purpose of updating one of these Item attributes.  The corresponding
    PHP script should determine the type of data passed and apply the appropriate
    update.


6.  Code a PHP script that would query Item and print the resulting data set
    formatted into columns and rows with HTML table tags.



7.  Provide an HTML menu for the user to link to the forms and scripts for
    either login, create table, insert, delete, update, or query as created
    for questions 1-6.