Download Original PDF

Get the official Barkatullah University print version scanned document.

Download/Print

🤝 Help Your Juniors!

Have previous year question papers that aren't on our website? Help the next batch of students by sending them to us! With your consent, we will proudly feature your name as a Top Contributor on our platform.

Submit Papers 📩
Roll No. ...................................................
Total No. of Questions : 11
[Total No. of Printed Pages : 6]

GH-454

M.Sc. IVth Semester (NEW/ATKT)

Examination, 2022

Computer Science

Paper- MSCS- 403

PHP & MYSQL

Time : 3 Hours
[Maximum Marks : 85]
Note- All questions are compulsory.

SECTION - 'A'

Objective Type Questions

5x2=10

1.
Choose the correct answer :

(i) Which of the following is correct to add a comment in php :

  1. &......&
  2. //.......
  3. /*.......*/
  4. Both (b) and (c)

(ii) Variable name in PHP starts with :

  1. ! (Exclamation)
  2. $ (Dollar)
  3. & (Ampersand)
  4. # (Hash)

(iii) Which of the following is the correct way to create a function named "student" in PHP ?

  1. Create student ( )
  2. New......function student ( )
  3. Function student ( )
  4. None of the above

(iv) The.............operator is used to test whether or not a value lies within a specified range :

  1. LIKE
  2. BETWEEN
  3. IN
  4. None of these

(v) Which of the following is the correct way to open the file "sample.txt" as readable ?

  1. Fopen ("student.txt", "r");
  2. Fopen ("student.txt", "r+");
  3. Fopen ("student.txt", "read");
  4. Fopen ("student.txt");

SECTION - 'B'

Short Answer Type Questions

5x6=30

2.
How can we declare variable and constant in PHP ? Explain it with an example.

OR

Explain XAMPP installation procedure.
3.
Explain any 3 pre-defined functions with their syntax and usage.

OR

Write a program in php containing form which submits the data on click of button and displays the entered data.
4.
Differentiate $....... GET and $....... POST. Explain with example.

OR

What do you mean by cookies ? Why are they needed ?
5.
What do you mean by phpMyAdmin ? What are the advantages of using it ?

OR

Explain pattern matching in MYSQL with syntax and example.
6.
Why is mysqli....connect ( ) used ? Explain with the help of an example.

OR

Write steps to delete data from MYSQL table using MYSQLI.

SECTION - 'C'

Long Answer Type Questions

5x9=45

7.
Explain different type of flow control statements in PHP with syntax and example.

OR

Write a program, embedding code of php in between. Explain how php code is parsed ?
8.
Define function. How to define user defined function ? Explain with example.

OR

How can you retrieve the values from the array using foreach ( ) ? Explain with example.
9.
Explain with the help of an example, how two strings can be compared same and validated if yes, and give error message if not.

OR

What do you mean by file handling in PHP. Explain different modes in which a file can be opened.
10.
Explain session management in PHP. Write the use of session....start ( ).

OR

Write the queries to display all and selected rows or columns based on some condition.
11.
Write the steps to create database "student" and table "basic...info" in MYSQL. How data can be inserted in mysql table.

OR

Write the PHP code for fetching the data from a database to a webpage.