CS602 Module5 Assignment
代写homework | assignment作业 | php代写 | database – 本题是一个利用database进行练习的代做, 对database的流程进行训练解析, 涵盖了php/database等程序代做方面, 这个项目是assignment代写的代写题目
2021 , Suresh Kalathur, All Rights Reserved. The following document should not be disseminated outside the purview of its intended purpose.
General Rules for homework Assignments
- You are strongly encouraged to add comments throughout the program. Doing so will help your instructor to understand your programming logic and grade you more accurately.
- You must work on your assignments individually. You are not allowed to copy the answers from the others.
- Each assignment has a strict deadline. Assignments submitted after the deadline will carry a penalty.
- When the term lastName is referenced in an assignment, please replace it with your last name.
Download and extract the starter template zip file, CS602_HW5_ lastName. Rename the folder with your last name. Complete the corresponding assignment files in this folder.
PDO Course/Student Manager (100 Points)
Create the necessary php files using PDO in order to provide
the following functionality. The application maintains a list of
courses. Each course has a list of students enrolled in that
course. The database structure and initial data used for the
application is shown at the end of this document.
The home page, index.php , shows a list of courses. The
students enrolled in the first course are shown as well. The
home page has links for deleting a student, adding a student,
and a link to manage the list of courses, as shown below.
Selecting a different course shows the same home page along with the request parameter corresponding to the selected course_id as shown below.
The List Courses link shows the course_list.php page as shown below. The current set of courses is shown. The page also includes a form for adding a new course. The user can also go the home page by clicking the List Students link.
The user can enter new course information and submit the form (use POST) by clicking the Add Course button, as shown below.
The add_course.php script handles the above form submission. The result includes the contents of course_list.php , as shown below. Note that the courses are always displayed in the ascending order of their course id.
The List Students link shows the home page, index.php. The newly added course has no students as shown below.
The Add Student link shows the add_student_form.php page. The form shows a drop-down list of courses, and the fields for entering the first name, last name, and email of the student. The form is submitted with POST.
The above form submission is handled by add_student.php. The result includes the home page, showing the course selection and the resulting students in that selected course.
The Delete button deletes the corresponding student from the database. The following figure shows the current list of students in the cs701 course.
The delete action is handled by delete_student.php. After the student is deleted, the result includes the home page with the current course.
The following should be used for connecting to the database, database.php.
Use the following database schema and the sample data shown below. The tables and the columns within the tables should match the schema shown.