CS计算机代考程序代写 database CIS245 Assignment 3

CIS245 Assignment 3

Based on Assignment 2, you are asked to update the website that you have

developed so far as follows.

• PHP-OOP should be used for Database connection and all MySQL query
execution (MySQLi Object-oriented)

• The database school contains four tables now as

The first table is called professors

Where SSN is the primary key and it’s auto increment (A_I)

The second table is named users where username is the primary key.

The third table is named courses where course id is the primary key and the

The fourth table is named course_prof where course id is a foreign key refers to

course-is in the course table and the prof-ssn is a foreign key refers to ssn attribute

in professors table

• The index page looks like this

The user will be redirected back to homepage page if he enters correct username

and password according to what is saved in the database. Session should be used

• The hompage.php page looks now like this:

• The user can fill the professor data and click on save. He’s redirected back to
homepage page if the add is successful. He cam also define new courses and add

them to the database.

• User can’t access the homepage without passing first by index page and enter
the correct credentials (username and password). He can logout by pressing the

link logout and will be redirected back to index page.

• When the link “display all professors” is clicked, we are taken to the page
display.php that gives this if no professors have been added yet

When add professor is clicked, the user is directed to home page again.

If some professors were added, it looks now like this:

If hyperlink that contains the ssn of the professor is pressed, then we are

redirected to the professor_profile.php

In this page you can display the profile of the selected professor (according to the

ssn that you have pressed in the display.php). You can delete the profile and the

professor record from the database. Finally, you can assign a new course to the

professor by selecting a course from the list of the courses that is connected to the

database.