Theory Assignment # 3
Theory Assignment # 3
Question-1: Create a simple web application that allows users to add, view, update, and delete
records of a contact list. The contact list should store the following information: Name, Email,
and Phone Number. Use HTML and CSS for the front-end and PHP for the back end. Your
application should include the following functionalities: [CLO-4][S0-2,4]
1. Create: A form to add a new contact.
2. Read: A page to display all contacts.
3. Update: An option to edit an existing contact.
4. Delete: An option to delete a contact.
Requirements:
• Use a MySQL database to store contact information.
• Style the application using CSS.
• Provide code snippets for each operation (Create, Read, Update, Delete).
Question 2: Extend the CRUD application from the previous question to include user
authentication. Only authenticated users should be able to access the contact list and perform
CRUD operations. Implement a simple login system using PHP sessions. [CLO-4][S0-2,4]
Requirements:
1. Registration: A form to register a new user.
2. Login: A form to log in.
3. Logout: A button to log out.
4. Session Management: Use PHP sessions to manage user authentication.
5. Access Control: Restrict access to the CRUD operations based on user authentication.