Tribhuvan University Faculty of Management Office of The Dean 2016
Tribhuvan University Faculty of Management Office of The Dean 2016
FACULTY OF MANAGEMENT
Office of the Dean Full Marks: 40
Time: 2 hrs
2016
BIM / Fourth Semester / IT 219: Web Programming-II
Candidates are required to answer the questions in their own words as far as practicable
Group ‘A’
Brief Answer Questions: [101=10]
1. List out the advantages of using PHP.
2. What is use of identical operator (==)?
3. Explain briefly how different kinds of numbers are stored using PHP variables.
4. Write syntax of foreach loop?
5. How a function is declared using default values for its arguments.
6. ''Validations should be performed on both the client and server side'' .Why?
7. Define server variable HTTP_USER_AGENT with example.
8. What are the advantages of using PEAR over PHP built in functions to work with database?
9. How will you display current date in web page using PHP statement?
10. What is use of mysql_fetch_assoc() function?
Group ‘B'
Exercise problems: [54=20]
11. Write a PHP program to create a web form that contains a textbox for name, and checkboxes for
hobbies. When a form is submitted, check a name is entered and at least one of the hobbies is selected.
12. Write a PHP program to display the contents of a database. Make your own assumptions about database.
13. Write a PHP function that makes three arguments: principle, rate and time and returns the calculated
interest. Make all the required validation to calculate the interest.
14. What is file? Write a program to write value taken from user to a file.
15. Write a PHP program to create a multidimensional array that holds the cities of districts in Kathmandu
valley such as Kathmandu(Newroad , Durbar Marg, Thamel) Lalitpur(Patan, Jawalakhel, Kupandole)
Bhaktpur(Durbar Square, suryabinayak). Then display the contents of array.
Group ‘C'
Comprehensive Answer Questions: [25=10]