Internet Technology II - Model Question Set 1
Pokhara University
Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.
Level: Bachelor
Program: BCSIT
Course: Internet Technology II
Full Marks: 100
Pass Marks: 45
Time: 3 hrs.
Section A (All Questions) 2 Marks
- What do you mean by Server-Side and Client-Side Scripting?
- Difference between if–else and switch statement PHP.
- Define user defined function with examples.
- Difference between GET and POST method in PHP?
- State the purpose of sessions and cookies.
- Write a PHP script to connect the database.
- List any 5 benefits of using OOP in PHP.
- What is the benefit of using a framework for code reusability?
- What is transaction management in a database?
- Explain the purpose of magic methods.
Section B (Any 5 Questions) 10 Marks
- Define Operators. Discuss different types of operators in PHP with suitable examples.
- Explain different types of looping statements in PHP. Write a PHP program to calculate the sum of the first 10 natural numbers using a loop.
- Explain PHP built-in functions. Describe string, math, date, time, and array functions with examples.
- What is input validation and sanitization in PHP? Write a PHP program to upload an image file and display its name, size, and type.
- Explain Error Handling in PHP. Write a program to implement a session-based login system that displays a welcome message after successful login and destroys the session on logout.
- Explain the MVC model. Describe the roles of Model, View, and Controller with a suitable diagram.
Section C (Any 2 Questions) 15 Marks
-
Develop a PHP MySQL based user registration and login system.
The system should:
- Create HTML forms for user registration and login
- Store user registration details in a database table
- Authenticate users during login using the same table
- Apply server-side validation for name, email, and password fields
- Explain arrays in PHP. Describe different types of arrays. Demonstrate array creation and array iteration using suitable PHP programs with examples.
- Explain object-oriented programming in PHP. Describe classes, objects, properties, and methods. Demonstrate inheritance, encapsulation, and polymorphism with suitable PHP examples.