You can name your database whatever you like. Create only one table named persons in your database for this assignment. The persons table should contain the fields (columns) exactly as follows:
personID int NOT NULL AUTO_INCREMENT, PRIMARY KEY(personID), FirstName varchar(15), LastName varchar(15), Age int, City varchar(15)
Note that this table definition is almost the same as the one at on the web page at http://www.w3schools.com/php/php_mysql_create.asp
In fact, much of the PHP/MySQL code for Assignment #5 can be copied (and edited) from the website http://www.w3schools.com/php/php_mysql_intro.asp
Some of your HTML for this assignment will look like the HTML for inserting a record at http://www.w3schools.com/php/php_mysql_insert.asp
If a user types in the appropriate URL to view your Assignment 5 web interface, your web page should
1. Display a very nicely formatted web page that describes what the web interface does, and then
2. Display the entire current contents of the persons table (the contents will change), and then
3. Display radio buttons/dropdown lists, text fields or other input areas that prompt the user to enter database requests (e.g., insert, select, update, delete) together with the appropriate additional input associated with the request (e.g., a new age to update).
Following a Submit button click, your code should invoke a PHP program (action) that completes the request of the user. In particular, your web page should
4. Display the result (including the entire contents of the persons table) after the user’s request has been completed (or displays an error). Use a second web page to display the results if you prefer. Then your web page should
5. Display the option to Quit or Enter Another Request.
6. If the user wants to enter another request, then cycle back to #1 above.
7. If the user chooses Quit, delete the entire persons table.
Populate the persons table with the following information at start up, before any requests are made:
- - - -
Put your initial HTML code with the questions, form and input areas in a file named mike- mahoney_assignment-5.php (but use your own name).
We need you to clarify your question for our tutors! Clarification request: Dear Student,... View the full answer