0% found this document useful (0 votes)
15 views8 pages

WD All

The document outlines a comprehensive curriculum covering various aspects of PHP, including server types, web servers, the client-server model, PHP features, and comparisons with other languages. It includes practical exercises such as writing scripts for mathematical operations, file handling, and database interactions using MySQLi. Additionally, it covers advanced topics like AJAX, object-oriented programming, and error handling in PHP.

Uploaded by

kisu0185
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views8 pages

WD All

The document outlines a comprehensive curriculum covering various aspects of PHP, including server types, web servers, the client-server model, PHP features, and comparisons with other languages. It includes practical exercises such as writing scripts for mathematical operations, file handling, and database interactions using MySQLi. Additionally, it covers advanced topics like AJAX, object-oriented programming, and error handling in PHP.

Uploaded by

kisu0185
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Unit 1

1. What is server? Enlist types of server.


2. What is web server? Explain any web server in detail.
3. What is XAMPP server?
4. Explain client-server model.
5. Enlist features of PHP.
6. Compare PHP with ASP, JSP and Perl.
7. How PHP script works?
8. Explain the use of echo statement with an example.
9. Compare print and echo statement.
10. Discuss variables in PHP.
11. Enlist the scope of variable in PHP. Explain each in detail.
12. What is the use of static keyword? Give an example.
13. Enlist data types supported by PHP.
14. Give an example of array and PHP object data type.
15. Enlist operators supported by PHP.
16. Explain comparison operators with an example.
17. State the difference between == and === operator.
18. Explain array operators with an example.
19. Explain logical operators with an example.
20. Explain string operators with an example.
21. Explain increment and decrement operators with an example.
22. Explain if-else statement with syntax and example.
23. Explain else-if ladder with syntax and example.
24. Explain nested if-else with syntax and example.
25. Explain switch statement with syntax and example.
26. Explain while loop with syntax and example.
27. Explain do-while loop with syntax and example.
28. Explain for loop with syntax and example.
29. Explain foreach loop with syntax and example.
30. Write a script to find addition of two numbers.
31. Write a script to check whether given number is odd or even.
32. Write a script to check whether given number is palindrome or not.
33. Write a script to find addition of odd numbers between 100 to 200.
34. Write a script to print first n prime numbers.

Unit 2

1. Enlist any three string functions and explain any one of them with example.

2. Write a PHP script to find maximum number from three number.

3. Explain following math function with example.


A) abs()

B) ceil()

C) pow()

4. Explain array_reverse() with an example.

5. Enlist any four variable functions. Explain any one of them with example.

6. Write script to find length of given array.

7. Explain following math function with example.

A) sqrt()

B) fmod()

C) min()

8. Write PHP script to find armstrong number.

9.Explain following date function with an example.

a) time()

b) getdate()

c) mktime()

10. Write a syntax to create function hello() with default argument.

11.Explain following string functions with an example.

a) strstr()

b) strpos()

c) str_replace()

12. Enlist any four array functions and explain any one of them with an example.

13. Enlist six string function and explain any three of them.
14.Explain current(), prev() and next() functions with syntax and example.

15. Which function is used to convert the value in integer? Explain it with syntax and
example.

16. Write a syntax to create function div() with two parameters.

17. Explain following array function with an example.

a) count()

b) each()

c) in_array()

18. Write a script to find minimum number from the given list.

19. Explain following functions with an example.

a) unset()

b) isset()

c) settype()

20. Write a script to count days from the given number.

Unit 3

1. Write Difference between GET and POST method in PHP.


2. Explain cookie in PHP.
3. Describe fwrite() in PHP.
4. Create a login system using sessions in PHP.
5. List the various operation performed on file.
6. State the syntax to create cookie in php.
7. Define: session and cookie.
8. Write a PHP script to display all the number of characters in the file along
with line number.
9. Explain fread(), fwrite(), fseek(), feof(), fclose() functions in detail.
10.Write use of session and cookie.
11. Enlist operation performed on file.
12.Write the use of Get and post method.
13.Write a PHP script to create file, open a file in write mode and write
14.Write use of following function.
i.readfile ()
ii.fseek ()
iii.feof ()
iv.getcwd ()
v.session_unset ()
15.Write syntax to create cookie in php.
16.Explain readfile() function in file handling.
17.Write a syntax for fclose() function.
18.Write a program to demonstrate use of session.
19.Write a program to demonstrate use of cookie.
20.Write difference between Get and Post method to send the data from client
to server.
21.What is the use of $_REQUEST variable?
22.Differentiate session and cookie.
23.Explain following function in detail.
i. fread()
ii. fwrite()
iii. fseek()
iv. feof()
v. fclose()
24.Create PHP script which takes username, email id and phone number from
user and display it on next page in tabular form.
25.State the difference between Get and Post method.
26.Describe various modes of fopen() function.
27.Explain following functions with example:
i. fgets()
ii. feof()
iii.getcwd()
28.Write a PHP script to display the number of characters present in the
29.file along with line number.
30.Define cookie with its parameter.
31.Create one webpage which ask user
32.for favourite movie, create cookie for movie and display it on nextpage.
33.List any four functions to read a file.
34.Explain the syntax and use of file() function in PHP.
35.Explain path and domain parameters of cookie.
36.Write a PHP script to show how a cookie can be used for
authentication.
37.Write a PHP script to open a file in read mode and display the
38.contents of the file along with line
Unit 4

1. Define a constructor in PHP.


2. Explain trait in PHP.
3. Explain public, private, and protected access modifiers with example.
4. Describe die() method of error handling with an example.
5. Write difference between Overloading method overriding method in PHP with
an example.
6. Define class with example.
7. Define an object in web development.
8. Write down difference between constructor and destructor.
9. Describe Inheritance with its types.
10.Write down short note on method overloading.
11. Define the following terms.
a. Class
b. Object
12.Enlist Access modifier.
13.Write a difference between constructor and destructor in OOP.
14.Explain Traits with an example.
15.Write a program to demonstrate the use of static keyword.
16.Define:
a. abstract class
b. interface
17.Write a difference between interfaces and abstract classes.
18.Explain static methods and Name space with example.
19.Enlist PHP access modifier and explain them with an example.
20.Write a PHP class that calculates the factorial of an integer.
21.Write the advantages of using Object-oriented programming over
procedural programming.
22.Explain Inheritance.
23.Explain abstract class with an example.
24.Explain overriding method in PHP with an example.
25.Explain Overloading method in PHP with an example.
26.Explain the use of access modifier.
27.Define:
c. Interface
d. Object
28.Explain interface with an example.
29.Explain PHP constructor and destructor with an example.
30.Explain autoloading classes with an example.
31.Write the advantages of using Object-oriented programming over procedural
programming.
32.Write syntax for constructor.
33.Explain static keyword with example.
34.Enlist the types of inheritance explain any one with appropriate
example.
35.Explain die() method of error handling with an example.

Unit 5

1. Write SQL query for the following:

1) Select data

2) Delete data

3) Alter data

2. Describe purpose of phpMyAdmin.

3. Explain mysqli_list_table() function with example.

4. Write PHP script to create table "Account" and insert the data given by user. Consider
the following table.

5. Account(account_id, branch_name, IFSC_code)

6. What is MySQLi? Enlist features of MySQLi.

7. Write PHP script to display table names and to display database name.

8. Explain mysqli_num_rows() function.

19.Answer following:

a) Which tool is used to represent tables graphically in XAMPP server?

b) Which function is used to close the connection with database?

c) What are the arguments of mysqli_connect()?

10.Enlist MySQLi commands and explain any three of them.

11.Write a PHP script to connect with databse.


12. Write PHP script to create table "Employee" and insert the data given by user.
Consider the following table.

Account (emp_id, emp_name, emp department, emp_email)

13. Explain mysqli_connect() function with example.

14. Explain delete query in detail.

15. Write PHP script to create table "Student" and insert the data given By user and also
perform

update operation. Consider the following table:

Student(en_no, name, cgpa, sem)

16. Explain mysqli_fetch_array() function with example.

17. Write a query to perform AUTO UPDATE while creating table.

18.. Explain update query in detail.

19. Write PHP script to create table "product" and insert multi data given by user.
Consider the following table: product(product_id, product_name, product_category,
product_qty)

20. Write PHP script to fetch data from table.

21. Explain mysqli_close() function with example.

Unit 6

1. Explain the use of AJAX. Which object is used to implement AJAX using JavaScript?
2. What is synchronous and asynchronous request? Give an example for any one of
them to implement
AJAX.
3. Write a script to retrieve particular table content from the database using AJAX.
4. What is XMLHttpRequest? What is the use of it?
5. Explain the working of AJAX with jQuery using example.
6. Create AJAX application to implement auto complete box in which when user enters
text into
textbox, suggestion should be given based on array values.
7. Describe the working of AJAX with JavaScript and PHP.
8. Explain various methods of XMLHttpRequest.
9. Write a script with AJAX and jQuery to print the message "Welcome to PHP", when
button is
clicked.
10. Enlist the properties of XMLHttpRequest.
11. Explain ajax() method of jQuery with an example.
12. Write a script with AJAX to print the message "Kindly check your status", when
button is clicked.
13. Enlist the methods of XMLHttpRequest.
14. Explain various properties of XMLHttpRequest.
15. Write a jQuery to submit feedback form data with AJAX using HTTP post method.

You might also like