0% found this document useful (0 votes)
148 views2 pages

Database Lab 5 26 10 2015 PDF

1) This document outlines the objectives and requirements for Lab 5, which involves creating a basic user registration and login form integrated with a database. 2) Students must implement database schemas for departments, users, and courses with primary and foreign keys, and populate the departments and courses tables. 3) The registration and login page should be combined, with registration validating usernames don't already exist and storing encrypted passwords. Successful registration redirects to a department selection page. 4) Login redirects to a courses page if a department is selected, or back to department selection if one is not selected yet. Session variables should store user details across pages.

Uploaded by

dante454500
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views2 pages

Database Lab 5 26 10 2015 PDF

1) This document outlines the objectives and requirements for Lab 5, which involves creating a basic user registration and login form integrated with a database. 2) Students must implement database schemas for departments, users, and courses with primary and foreign keys, and populate the departments and courses tables. 3) The registration and login page should be combined, with registration validating usernames don't already exist and storing encrypted passwords. Successful registration redirects to a department selection page. 4) Login redirects to a courses page if a department is selected, or back to department selection if one is not selected yet. Session variables should store user details across pages.

Uploaded by

dante454500
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Computer and Communications

Program 7th term


CC471, Database Systems
Lab 5

Alexandria University
Faculty of Engineering
Specialized Scientific Programs
Fall 2015

Lab 5

Objectives:

Registration and login form

Integrate Web applications with database.

Apply integrity constraints to a database schema.

Create basic registration and login form using PHP and HTML.
Validate forms using JavaScript.

First: Database

Implement the following basic schema using DDL statements


department (dept_id , name , description)

user (user_id, email, username, password, registration_date, department_id)

Notes:

course (course_id , course_name , course_ description ,instructor_name, credit_hours,


department_id )

1. Necessary primary and foreign key constraints must be added for all tables.

2. Department and course tables must be filled with data (using DML statements).

Second: Registration and Login Page (in the same page)

Registration Just like Lab3 but validate if username already exists (Php validation) ,Storing

password encrypted is required and After successful registration, you should redirect the user to another
page called chooseDepartment.php.

Login after successful login (valid user_name and password), you have two options:

1. If the user has already chosen his department. So you have to redirect him to courses.php.
2. If the user hasnt chosen his department yet, you have to redirect him to
chooseDepartment.php.

Eng. Sami Mamdouh


Eng. Mina Shafik
Eng. Fadi Nakhla

Page 1 of 2

Dr. Yousry Taha

Third: Choose Department Page


It should have

1. Welcome {UserName}.

2. Displaying list of departments to let the student selects his department. After selecting

department, you should redirect him to courses.php page.

Fourth: Courses Page


It should have

1. Welcome {UserName}.

2. Displaying table of courses for a students department which was selected in

chooseDepartment.php.

Hints:

1. You should use session to store logged user_id and user_name across pages.

2. DML (Data Manipulation Language) Statements are the insert statements as you made in lab 4.
3. You can check if username already exists using SELECT * FROM user WHERE user_name=
$username" and check that num of records = 0.

4. You can update department_id value in user table using UPDATE user set department_id =
$departmentId WHERE user_id= $userId.

Bonus

Using CSS to format the forms.

Policies

Lab submission and discussion will be during the lab session of each section, please take the
time to prepare for this assignment before you attend, so you can make the best use of the lab's
limited time to ask your questions. You should deliver DDL script for database creation and
DML script containing data of departments and courses.
You should work individually.

If 2 or more copies are discovered, all copies will lose all the marks of year work. Hence, it is
better to deliver nothing than delivering a copy.
Late submission is allowed for one week with 80% of the total mark. No late submission is
allowed after that.

Eng. Sami Mamdouh


Eng. Mina Shafik
Eng. Fadi Nakhla

Page 2 of 2

Dr. Yousry Taha

You might also like