Assignments 4 PHP-2022-23

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

GOVERNMENT POLYTECHNIC - HIMATNAGAR

GADHODA ROAD, MOTIPURA, HIMATNAGAR-383001


DEPARTMENT OF INFORMATION TECHNOLOGY

Course Name & Code Semester/Branch Issue Date Due Date


WEB DESIGNING USING PHP AND
6th/IT 16/04/2023 28/04/2023
MYSQL (3361603)

Assignment# 4
Unit-4: Session, Cookies and Error handling
CO4: Debug the Program by applying concepts and error handling techniques of PHP.

Remember (R) – Level Questions (06 Marks)


1. Define cookie.
2. Define session.
3. List out Error types in PHP.

Understand (U) – Level Questions (16 Marks)


1. Explain accessing cookie with suitable example.
2. Explain delete a cookie with suitable example.
3. Explain working of session.
4. List out error handling mechanism in PHP. Explain each mechanism with suitable
example.

Application (A) – Level Questions (08 Marks)


1. Design HTML form to enter user name and password from customer. Write a PHP
script to validate user name and password received from customer, if user name and
password are correct then redirect user to home page and set a cookie for five days
for logged in user (display suitable message for cookie is set or not), otherwise
redirect user to customer registration page which accept following information from
customer: Customer Name, Mobile no, email, password.
2. Design HTML form to enter user name and password from student. Write a PHP script
to validate user name and password received from student, if user name and

Subject In charge,
DR. Gaurang Lakhani,
Lecturer, IT,
Govt Polytechnic Himatnagar
GOVERNMENT POLYTECHNIC - HIMATNAGAR
GADHODA ROAD, MOTIPURA, HIMATNAGAR-383001
DEPARTMENT OF INFORMATION TECHNOLOGY

password are correct then set a session for logged in user and redirect user to home
page with display a welcome user message, otherwise redirect user to student
registration page which accept following information from student: Student Name,
Enrollment No, Mobile no, email, password. Provide logout option on home page,
write a PHP script to destroy a session for a login user if user click on logout option.

Subject In charge,
DR. Gaurang Lakhani,
Lecturer, IT,
Govt Polytechnic Himatnagar

You might also like