Internet Technology II - 2025 Fall
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?
- How do you declare a constant in PHP? What is its purpose?
- Explain the use of the switch statement in PHP with a simple syntax example.
- What is an associative array in PHP? Show an example of a key-value pair.
- Difference between GET and POST method in PHP?
- State the purpose of sessions and cookies.
- Write a simple PHP snippet to connect to a MySQL database using MySQLI.
- Explain the purpose of magic methods.
- Write any two benefits of using a PHP framework such as Laravel.
- What is transaction management in database?
Section B (Any 5 Questions) 10 Marks
- Define Operators. Discuss different types of operators in PHP with suitable examples.
-
Describe different conditional statements and loops in PHP.
Write a program using if-else, for, and do-while loops to display odd numbers between 1 and 20.
-
Explain PHP built-in functions.
Describe string, math, date-time, and array functions with examples.
- Write the importance of data validation and sanitization in PHP with example.
-
What is error handling in PHP?
Write a login system using try-catch blocks and sessions to authenticate a user.
- Explain the MVC model. Describe the roles of Model, View, and Controller with a suitable diagram.
Section C (Any 2 Questions) 15 Marks
-
Explain object-oriented programming in PHP.
Explain object-oriented programming in PHP. Describe classes, objects, properties, and methods. Demonstrate inheritance, encapsulation, and polymorphism with suitable PHP examples.
-
Perform CRUD operation
Perform CRUD operation to create student information system with attributes (id, name, age, class) with database name as student_info and table name as student.
-
Explain array in PHP. Describe different types of arrays.
Explain array in PHP. Describe different types of arrays. Demonstrate array creation and array iteration using suitable PHP programs with examples.