The document is a comprehensive question bank for PHP, covering various topics such as data retrieval from MySQL, variable types, session management, cookies, and file handling. It includes both short answer questions worth 2 marks and detailed questions worth 7 marks, aimed at assessing knowledge of PHP programming and its functionalities. The questions also address configuration settings for web servers and differences between various PHP functions and methods.
The document is a comprehensive question bank for PHP, covering various topics such as data retrieval from MySQL, variable types, session management, cookies, and file handling. It includes both short answer questions worth 2 marks and detailed questions worth 7 marks, aimed at assessing knowledge of PHP programming and its functionalities. The questions also address configuration settings for web servers and differences between various PHP functions and methods.
1 What are the different ways to retrieve the data in the result set of MYSQL using PHP? 2 Differentiate between single quote and double quote. 3 Explain Exit and Return. 4 What is Session? 5 What is the use of header () function? 6 Explain $_session (). 7 Explain define (). 8 What is difference between functions unlike and unset? 9 State when PHP is more suitable than its companion technology? 10 How to delete session variables? 11 Differentiate between static and global variable? 12 Explain REQUEST method. 13 Explain the term “Die and Return”. 14 What is auto _append file in php.ini? Explain it. 15 What is $_REQUEST? Explain with an example. 16 What is echo and print in PHP? What is a difference between these? 17 Explain the following functions with the syntax and example: current(),ord(),stristr(),each(),strrpos(),chr(),str_replace(),in_array(),List(), Each(),Assort(),MKtime(),Is_ readable(),Fmod(),Isset(). 18 Explain mysql_free_result () and mysql_close (). 19 Differentiate between $name and $$name. 20 Explain Ternary operator with example. 21 Explain an Associative array. 22 Explain POST method. 23 Differentiate between include () and require (). 24 Explain persistent cookie. 25 What are default session time and path? 26 What is the difference between single quote string literal and double quote string literal? 27 What are the configuration settings of PHP in IIS web server? 28 What is use of isset () function? 29 How comments are given in PHP code? 30 How functions are created in php? 31 Discuss different ways of commenting php code? 32 Write a PHP code to read employee details. 33 What do you mean by open source? 34 How can you count number of records in a record-set using PHP? 35 How will you modify session variables?
Answer the following: (7 marks)
1 Explain how PHP code is parsed. 2 Explain PHP variables. Explain the types of variables by giving suitable examples. 3 How arrays are created in PHP? Explain any two sorting functions of an array. 4 Write a script for login with all validations. 5 Explain the use of cookie. When cookie is expired? Explain how it is created and retrieved. 6 Date function of PHP. 7 How to upload a file. 8 Write a query to find second highest value from table. 9 Explain session variables. Explain how they are handled. 10 Explain user defined functions. 11 While working in PHP what are the different configuration settings one has to do with IIS and Apache web servers? 12 Explain any seven Math functions of PHP. 13 Explain about FORM elements and INPUT elements. 14 Explain validations of user input. 15 Explain the term ‘Order by’ and ‘Truncate’ of MySql with examples. 16 How to start, modify and unregister the session variables. 17 Differentiate between mysql_fetch_array () and mysql_fetch_assoc ().
18 Explain how to use MYSQL REPLACE to INSERT or UPDATE data.
19 Explain with an example, how a file can be uploaded in PHP. 20 Write a PHP script to list databases available in MYSQL database server.
21 Explain any five functions of file handling in PHP.
22 Explain the following functions with example: Die (), Print (), strstr (), Isset (), rand (), Fmod (), Floor (), Checkdate (). 23 Write a short note on cookie. 24 Write note on Control Structures in PHP. 25 Discuss different Data types of PHP. 26 Discuss different types of tables in mysql. 27 Discuss different loops available in PHP. 28 What is session? Where you will use it in web programming? 29 Write a php script to list data in table from database. [5 marks] 30 Write a php script to list databases available in MySql database server. [5 marks] 31 List all input elements. Explain any two with example. 32 Write a script to fill combo box from MySql database. 33 Write a short note on php.ini. 34 Write note on conditional structures in PHP. 35 Explain Truncate and Alias terms of MySql. 36 Construct various sessions for an application which performs addition and deletion of particular employee. 37 How file can be uploaded in php? Explain with an example. 38 What are cookies? Explain how cookies are Set, View, and Deleted? 39 How PHP code is parsed? 40 Write short note on php.ini 41 Short note on Data types in MySql. 42 Short note on Application area and Features of PHP. 43 Discuss the following functions with example: fmod (), rand (), is_writable (), fread (), rtrim (), strcmp (). 44 Discuss different operators available in php. 45 Discuss the Super Global variables of php. 46 Write a php Script to list data in the table. 47 Discuss any five date functions oh php. 48 Give the difference among the following: I. Require and include II. Unlike and unset III. GET and POST IV. Include () and include_once () V. Static variable and global variable.