JNTU

JNTU B.Tech IV Year PHP PROGRAMMING Previous Question Paper (June - 2024 - R16)

B.Tech | IV Year | II | R16 | June - 2024

Answer PaperPaper Code: 138GQMaximum Marks: 75Time: 3 Hours

Note: i) Question paper consists of Part A, Part B.
ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions.
iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.

Part A

125 marks
a

Define PHP.

2 marks

Answer

PHP stands for PHP: Hypertext Preprocessor. It is a widely-used, open-source server-side scripting language specifically designed for web development that can be embedded directly into HTML code.

b

Explain the purpose of PHP tags in a web page.

3 marks

Answer

PHP tags act as delimiters that signal to the web server that the enclosed code should be processed by the PHP engine rather than being sent directly to the browser as plain text. The standard tags are

<?php ... ?>
. This allows developers to mix dynamic server-side logic seamlessly within static HTML content.

c

State the purpose of the rand() function in PHP.

2 marks

Answer

Sign in to view the complete answer paper.

d

Explain the difference between local and global scope in PHP variables.

3 marks

Answer

Sign in to view the complete answer paper.

e

State two examples of HTML form elements.

2 marks

Answer

Sign in to view the complete answer paper.

f

Explain the role of the action attribute in an HTML form. How does it affect form submission?

3 marks

Answer

Sign in to view the complete answer paper.

g

List and briefly explain three types of errors in PHP.

2 marks

Answer

Sign in to view the complete answer paper.

h

Define what exceptions are in PHP. How are they different from regular errors?

3 marks

Answer

Sign in to view the complete answer paper.

i

State two commonly used MySQL commands.

2 marks

Answer

Sign in to view the complete answer paper.

j

Explain the syntax of a basic MySQL query. What are the components of a SELECT statement?

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Create a PHP script that calculates the sum of two numbers entered by the user.

5 marks

Answer

Sign in to view the complete answer paper.

b

Implement a PHP script that reads data from a MySQL database and displays it in a formatted table.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Develop a PHP program that checks if a given number is prime or not.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a PHP function that counts the number of occurrences of a specific word in a given string.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Create a user-defined PHP function that calculates the factorial of a given number. Demonstrate its usage with an example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Design a PHP script that checks if a given username already exists in a MySQL database. If not, insert the username into the database.

5 marks

Answer

Sign in to view the complete answer paper.

OR
5

Write a PHP program that takes user input (name and age) from a form and displays a personalized greeting based on the age provided.

10 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Analyze the importance of data validation in form processing. How does it contribute to the security and integrity of web applications?

5 marks

Answer

Sign in to view the complete answer paper.

b

Evaluate the impact of file handling errors on the reliability of web applications. How can such errors be minimized through error handling techniques in PHP?

5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Explain how to create and delete folder with an example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Describe about the validating the user input.

5 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

Create a PHP script that generates an image table dynamically based on user input.

5 marks

Answer

Sign in to view the complete answer paper.

b

Examine the significance of proper syntax in PHP scripts to avoid parse errors. How can developers ensure syntactic correctness?

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Describe how emails can be sent using PHP. What functions are commonly used for this purpose?

5 marks

Answer

Sign in to view the complete answer paper.

b

Develop a PHP script that sets a cookie with user preferences and retrieves it on subsequent visits.

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Create a MySQL query that retrieves all records from a table named “users”. Provide a brief explanation of each component of the query.

5 marks

Answer

Sign in to view the complete answer paper.

b

Create a MySQL query that deletes records from a table based on specified conditions, such as a certain value in a particular column. Provide an example scenario.

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Design a MySQL query that joins two tables, “orders” and “customers”, based on a common field such as customer ID. Provide an explanation of the join type used.

5 marks

Answer

Sign in to view the complete answer paper.

b

Design a MySQL query that alters the structure of a table by adding a new column. Include the necessary syntax for the alteration.

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of PHP PROGRAMMING from JNTU for B.Tech ECE IV Year II, June - 2024, R16.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in PHP PROGRAMMING

Loading Question Papers

Fetching data from database...