Basic database project - using SQL, PHP, CSS

Student Project II Guidelines Project Description The goal of the second student project is to develop a web application that is able to validate user input as well as store, retrie ve, update and delete i tems in a database . This assignment consists of a web application that has , at a minimum , the following features : Functionalities 1. Validate user input using PHP The web application should allow the user to enter data in a form and then vali date the user input using PHP . This fo rm should have at least 5 input fields. Once the user submits the form, a PHP script should validate the data entered by the user in all input fields. In other words, all mandatory and required fields should be validated. If the user input data is not vali d (i.e., missing and/or inco rrect data), this data should not be stored in the database and the web applica tion should point out to the user which field(s) have invalid data and why. If the user input data is v alid, this data should be stored in th e database. 2. Store user input in the MySQL database The web application should store t he data entered by the user in the form and validated using PHP in the MySQL database. All data entered by the use r and validated should be stored in the database (i.e., mandatory and/or optional input fields ). 3. Retrieve items in the MySQL database The web application should allow the user to retrieve all items currently stor ed in the database. Specifically , the user should be able to request a list of all items stored in the database in a tab le format . The table columns and the user input form fields (associated with functionality #1 ) must necessarily match . The data on the table is dynamic . In other words , the content of the table changes according to user actions . For example, after a user stores an item in the database , updates an item in the database, or delete item(s) in the database, the table should reflect the respective changes in the database . 4. Update item in the MySQL database The web application should allow the user to update an item currently stored in the database. Specifically, the user should be able to choose an item to update from a list of all items currently in the database . On ce the user selects which item they want to update, the web application should provide the user a form with the same input fields as the one used to add items to the database. However , the fields of the form to update an item should be filled in with the data currently stored in the database for that item . After the user updates the field(s) they want to change and submit s the form, the user input should be validated using PHP in the same manner described above (refer to functionality #1).

The item should only be updated if the user input data i s valid. 5. Delete item (s) the MySQL database The web application should allow the user to delete item (s) currently stored in the database. Specifically, the user should be able to choose item (s) to delete from a list of all items currently in the database . On ce the user selects which item (s) they want to delete , the web application should remove such item(s) from the database . Ch aracteristics 1. Semantic Markup The HTML markup should avoid excessive, unnecessary inclusion of CSS and PHP. With respect to CSS, external style sheets should be used to include CSS as opposed to inline or embedded CSS. In the case of PHP files , the web programmer should strive to keep the PHP script separate from the HTML markup to the extent possible. One effective strategy is to use include statements in the PHP files to separate markup from script. 2. Responsive Design The entire web application (i.e., all web pages ) should have a general design (e.g., top navigation bar, bottom navigation bar , side items ) that is responsive to different screen sizes. All the functionalities described above should be avai lable in a convenient layout on devices of different screen sizes. 3. Navigation There should be enough links in the web application to allow the user to easily navigate through the web pages associated with the various functionalities described above . Note that not all links included on your web pages need to actually work (i.e., they may point to "#"). You may want to use your student project I as the basis for your student project II. For example, the user input form and the table that you develop ed in the first project could be used in the second project to gather data to be stored in the database and to display the it ems retrieved in the database to the user, respectively. Furthermore, you may want to use the CSS stylesheets an d media queries you used in your first project to create a responsive design for your second project. Notes  You are not required to use client -side validation in your second student project. Regarding validation, you will only be graded based on server -side validation (i.e., validation using PHP).  You are not required to use project I as the basis for project II. Grading Criteria:  PHP Validation : 18 %  Store Item : 1 8%  Retrieve Items : 18 %  Update Item : 18 %  Delete Item(s): 18 %  Semantic markup : 2.5%  Responsive design : 2.5%  Navigation: 5% Your work will be evaluated based on the quality of your solution in terms of the criteria specified above. You are expected to adhere to web development best practices (as outlined in the textbook). The brief description of your web application provided by you (as specified below) will serve to clari fy your project ’s functionalities and characteristics . Submission Instructions: You must submit all the files you created/used in your web application and a Word document that describes the functionality and characteristics of your application as well as the URL of your project . Submission files may include:  HTML file(s)  CSS file(s)  Javascript file(s)  PHP file(s)  Any other file you may have used (e.g., image files) The Word document should briefly explain how and where you met the requirements of the projec t both in terms of functionalities and characteristics as outlined above . It should be a concise document that explains what you did (e.g., user input form validation using PHP), how you did it (e.g., which fields are mandatory and which ones are optional, what are the validation rules for each field) , and where you did it (e.g., validation.php lines 10 -100) . In this description, do n ot focus on the code you wrote (since you will also submit the files you created), but on the functionality and characteristics of your application. Functionalities and characteristic s that are not documented will not be considering when evaluating your work. Example Project The following ar e screenshots of an example project. Note that these are intended to provide you an i dea of how a web application could be designed to meet the above project description. However, this example project is by no means the only or the preferred way to develop your web application. You are expected to exercise creativity and critical judgment to develop your own web application. Remember that the quality of your solution will be taken into account when evaluating your work, as specified in the grading criteria above.  URL  PHP Validation  Store Item  Retrieve Items  Update Item  Delete Item(s)