Submission
Create assignment10
directory on itpwebdev.com server within public_html
. Upload all assignment files to that new directory, then link the assignment on your Student Page. Do not modify any assignment files after the deadline. The last modified timestamp serves as your submission time.
You can also optionally upload this on Blackboard as a backup if upload fails for partial credit.
*Important:* After the completed files are uploaded to the server and you test them, you might not notice some changes show up immediately. For example, add a new DVD and search for it. If the new DVD does not show up in the search_results.php
, check the database first that the new DVD has been inserted in to the database. If the DVD still does not show up in search_results.php
, it’s likely that the browser is showing a cached version of your search_results.php
and it is not updating to show your new DVD. In this case, try to hard refresh the page by pressing shift in your keyboard and click the refresh icon in the browser. This will force the browser to show the latest version of search_results.php
.
Overview
For this assignment, you will complete a CRUD application using your DVD database.
Sample
Note: samples below don’t always meet all the requirements. Make sure to follow the requirements rather than solely relying on the samples.
http://304.itpwebdev.com/~zune/assignment_07/index.php
Requirements
HTML/CSS
- You may use the given starter HTML files (styled with Bootstrap) or create your own HTML files for practice.
CRUD Workflow
- You can use any workflow, as long as you provide full CRUD functionality
Main Page (index.php)
- Page title
- Links to Search Form and Add Form
Search Form & Search Results
- Same requirements as in Assignment 8.
- You may re-use your Assignment 8 files.
- Each DVD title should be a link to Detail Page.
- Additionally, each DVD Title on Search Results page should have a delete button where users can click to delete the title.
Detail Page
- Check for any errors & missing data.
- Output appropriate error messages.
- Display all information corresponding to the DVD.
- Title,
- Release Date,
- Award,
- Label (name, not primary ey),
- Sound (name, not primary key),
- Genre (name, not primary key),
- Rating (name, not primary key),
- Format (name, not primary key).
- Link for users to go back to search results.
Add Form
- Check for any errors and missing data.
- Output appropriate error messages.
- DVD Title text field (indicate as required field).
- Following drop-downs dynamically populated with data from the database.
- Genre,
- Rating,
- Label,
- Format,
- Sound,
- Use primary keys for
value
attributes, - Display the name (genre, rating, etc) as drop-down option,
- Include Select One (empty/no selection) as first option in each drop-down.
- Award Text Area.
- Release Date Date Input (<input type=’date’…>).
Add Form
- All PHP & MySQL errors are handled and displayed.
- Including missing user input for required fields.
- Add DVD to the database using prepared statements.
- Only DVD Title is a required field.
- Other fields should have user-selected values or NULL.
- Display the following message if DVD is added successfully in green:
- [DVD Title] was successfully added.
- Note: When searching for newly added records, you might have to do hard-refresh to see them.
Delete & Edit Functionality
- Users need to be able to edit and delete each DVD record.
- Show confirmation popup before actually deleting the record.
Delete Page
- Check for any errors & missing data.
- Output appropriate error messages.
- Delete DVD record from the database.
- Display the following message if DVD is deleted successfully:
- [DVD Title] was successfully deleted.
Edit Form
- Check for any errors & missing data.
- Output appropriate error messages.
- DVD Title text field (indicate as a required field).
- Following drop-downs dynamically populated with data from the database.
- Genre,
- Rating,
- Label,
- Format,
- Sound,
- User primary keys for
value
attributes - Display the name (genre, rating, etc) as drop-down option,
- Include Select One as first option in each drop-down.
- Award Text Area.
- Release Date Date Input (<input type=”date”>…)
- DVD Title ID hidden field with value set to current DVD’s primary key.
- Only DVD Title is a required field for user input. All other fields are optional.
- All form fields need to be pre-populated or have current DVD’s data pre-selected.
- For example:
- Pre-populate DVD Title text-field with DVD’s current title.
- Pre-select drop-downs with DVD’s current drop-down value.
- For example:
- Submit & Reset buttons.
Edit Confirmation Page
- Check for any errors & missing data.
- Output appropriate error messages.
- Update DVD record in the database.
- Display the following message if DVD is updated successfully:
- [DVD Title] was successfully updated.
- Provide a link to the details page for edited DVD record.