BIT 5th Semester
Web Technology II Board Question Paper 2079

Views: ...

BIT 301-2079 ✡
Tribhuvan University
Institute of Science and Technology
2079
Bachelor Level/Third Year/Fifth Semester/Science
Bachelors in Information Technology (BIT 301)
(Web Technology II)
Full Marks:60 Pass Marks:24 Time:3 hours

Candidates are required to give their answers in their own words as for as practicable.
The figures in the margin indicate full marks

Section A
Long Answer Questions
Attempt any Two question.
[2x10=20]
1.

What are variables? How can define static variables? Write a PHP program to illustrate the use of Switch statement.

2.

How can you store string type data in an array? Write a PHP program to illustrate use of extract and compact functions for conversion between arrays and variables.

3.

Consider you have a login form having username, password fields, login and cancel buttons. Now, write a PHP program for implementing login form. The login should be redirected to home.php upon successful login button event. The cancel button should clear the form form field values upon its submission.

Section B

Attempt any Eight questions

[8x5=40]
4.

How are comments written in PHP? Write a PHP program that will read your name and roll number and print the values. Label your program with appropriate comments.

5.

Write a PHP program that will contain a concat strings function. The funcation should have two arguments st1 and st2 of type string and should return st3 which is concatenation of str1 and st2.

6.

Write PHP program to extract subset of a array using array_slice() function.

7.

Describe an anonymous class using suitable example.

8.

Write a PHP program for illustrating the starting and ending of session.

9.

How can you query a database in PHP?

10.

How can you retrieve the form data? Illustrate with example.

11.

What is error handler? Write a PHP program to show use of error handler to format and print errors.

12.

For the following JSON file named BIT.JSON, write a PHP program to read information from this JSON file.

{
        Name: "Gunadi",
        Email: "Gunadi@gmail.com",
        Dob: "January 1",
        Age: 30
}