SECTION A
1. How is PHP code parsed?
PHP code is parsed by the PHP interpreter on the server. The server reads the
PHP code, processes it, executes the logic, and converts it into HTML. The final
output is then sent to the user’s browser. The browser never sees the PHP code,
only the generated output.
2. How can we declare associative arrays in PHP?
Associative arrays in PHP are declared using key–value pairs. Each value is
accessed using a unique key instead of an index. They are useful for storing
related data like names and marks.
3. Describe about Regular Expression.
Regular expressions are patterns used to search, match, or replace text in strings.
In PHP, they are commonly used for validation like email, password, or phone
number checking. Functions like preg_match () are used with regular
expressions.
4. Explain conditional statement in PHP.
Conditional statements in PHP are used to make decisions based on conditions.
Common statements are if, if-else, else-if, and switch. They allow the program to
execute different blocks of code depending on whether a condition is true or false.
5. Define predefined variable.
Predefined variables in PHP are built-in variables provided by PHP. Examples
include $_GET, $_POST, $_SESSION, and $_SERVER. These variables are
automatically available and used to collect form data, server details, and session
information.
6. Define HTML.
HTML (Hypertext Markup Language) is used to create and structure web pages.
It uses tags to define elements like headings, paragraphs, images, and links.
HTML forms the basic structure of a website and works with CSS and JavaScript.
7. Describe features of MySQL.
MySQL is an open-source relational database. It is fast, secure, easy to use, and
supports large databases. MySQL works well with PHP, supports SQL queries,
multi-user access, and provides data security through authentication.
8. Define PayPal Integration.
PayPal integration allows websites to accept online payments using PayPal. It
enables secure transactions, supports multiple currencies, and allows users to pay
using cards or PayPal accounts. It is widely used in e-commerce websites.
9. Describe XML.
XML (Extensible Markup Language) is used to store and transport data. It is
platform-independent and uses tags to define data structure. XML is readable by
humans and machines and is commonly used for data exchange.
10. Describe function in PHP.
A function in PHP is a reusable block of code that performs a specific task. It
helps reduce code repetition and improves readability. Functions are defined
using the function keyword and can accept parameters and return values.
11. Describe PHP constants.
PHP constants are fixed values that cannot be changed once defined. They are
defined using the define() function. Constants are global by default and
commonly used for values like database names or URLs.
12. Define web concept.
The web concept refers to accessing information over the internet using web
browsers and servers. It follows the client–server model, where the client requests
data and the server respond using protocols like HTTP.
13. Describe Form.
A form is an HTML element used to collect user input such as text, passwords,
and selections. Form data is sent to the server using methods like GET or POST
for processing.
14. Describe Frame.
A frame divides a web page into multiple sections, each displaying a separate
HTML document. Frames allow multiple pages to be viewed in one browser
window. They are rarely used in modern web design.
15. Write SQL command for mysql_fetch_row.
mysql_fetch_row() is used to fetch a row from a query result as a numeric array.
Example:
$row = mysql_fetch_row($result);
16. Write SQL command for mysql_select_db.
The mysql_select_db() function selects a database for use.
Example:
mysql_select_db("database_name");
17. Define DTD.
DTD (Document Type Definition) defines the structure and rules of an XML
document. It specifies allowed elements, attributes, and their relationships to
ensure valid XML documents.
18. Write PHP program to print current date and time.
PHP uses the date() function to display date and time.
Example:
echo date("d-m-Y h:i:s");
19. Describe object-oriented programming.
Object-oriented programming is a programming approach based on objects and
classes. It supports concepts like encapsulation, inheritance, and polymorphism,
making programs modular and reusable.
20. Define string.
A string is a sequence of characters used to store text. In PHP, strings can be
written using single or double quotes and are commonly used for messages and
data display.
21. List any four advantages of PHP.
PHP is open-source, easy to learn, platform-independent, and works well with
databases like MySQL. It is widely used for web development.
22. State the use of “$” sign in PHP.
The $ sign is used to declare variables in PHP. Every variable name must start
with $, such as $name or $age.
23. What do you understand by Validation?
Validation is the process of checking user input to ensure correctness and
security. It prevents invalid data entry and protects applications from errors and
attacks.
24. How can we create link in PHP pages?
Links are created using the HTML <a> tag inside PHP pages. PHP can
dynamically generate links using echo statements.
25. Can we run PHP from HTML file? If yes, how?
Yes, PHP can run in HTML files if the file is saved with .php extension and PHP
code is written inside <?php ?> tags.
26. Define variables.
Variables are used to store data values in a program. In PHP, variables start with
$ and can store numbers, strings, or arrays.
27. How can we use comments in PHP?
Comments in PHP are used to explain code. Single-line comments use // or #, and
multi-line comments use /* */.
28. Explain session in PHP.
A session stores user information across multiple pages. PHP sessions are created
using session_start() and commonly used for login systems.
29. What is Database?
A database is an organized collection of data stored electronically. It allows easy
storage, retrieval, updating, and management of data using database software like
MySQL.
SECTION B
1. Explain difference between $_GET and $_POST.
$_GET and $_POST are PHP super-global arrays used to collect form data.
$_GET sends data through the URL, so values are visible in the browser address
bar. It is mainly used for non-sensitive data such as search queries and page
navigation. The data length is limited and less secure.
$_POST sends data in the HTTP request body, so values are not visible in the
URL. It is more secure and suitable for sensitive information like passwords and
login details. $_POST has no data size limitation and is widely used in form
submission. Overall, $_POST is preferred for secure and large data transfer, while
$_GET is used for simple requests.
2. Write PHP program to compute addition of two matrices.
Matrix addition in PHP is done by adding corresponding elements of two
matrices. Both matrices must have the same size. Nested loops are used to
traverse rows and columns.
<?php
$a = [[1,2],[3,4]];
$b = [[5,6],[7,8]];
$c = [];
for($i=0; $i<2; $i++) {
for($j=0; $j<2; $j++) {
$c[$i][$j] = $a[$i][$j] + $b[$i][$j];
}
}
Echo ($c);
?>
3. Define file uploading in PHP. Explain built-in file handling functions.
File uploading in PHP allows users to upload files to the server using HTML
forms. PHP stores uploaded file information in the $_FILES array.
Important file handling functions include move_uploaded_file() to move files to
a directory, fopen() to open files, fread() to read content, fwrite() to write data,
and fclose() to close files. These functions help manage server files safely and
efficiently.
4. Describe AJAX PHP example with program.
AJAX with PHP allows web pages to update content without reloading.
JavaScript sends a request to the server, PHP processes it and returns data
dynamically.
Example: A username availability check where AJAX sends username to PHP
and receives response instantly. AJAX improves speed and user experience.
5. Describe insertion and deletion of data using PHP by example.
Insertion adds new records into a database using SQL INSERT queries, while
deletion removes records using DELETE. PHP executes these queries through
MySQL connections.
Example:
INSERT INTO student VALUES(...) adds data, and
DELETE FROM student WHERE id=1 removes data.
These operations help manage database records dynamically.
6. How to validate form in PHP?
Form validation ensures user input is correct and secure. PHP validates data by
checking empty fields, email format, numeric values, and password length.
Functions like empty(), filter_var(), and strlen() are used. Validation prevents
invalid data and improves application security.
7. Describe displaying data from MySQL in webpage.
PHP displays MySQL data by connecting to the database, executing a SELECT
query, fetching results using mysqli_fetch_assoc(), and displaying them using
loops in HTML tables. This is commonly used for reports and dashboards.
8. Describe AJAX XML Parser.
An AJAX XML Parser is used to read and process XML data received from a
server asynchronously without reloading the web page. In AJAX, JavaScript
sends a request to the server, which returns data in XML format. The XML parser
then extracts required values using DOM methods such as
getElementsByTagName() and displays them dynamically on the webpage. This
approach improves performance and user experience because only required data
is loaded instead of refreshing the entire page. AJAX XML parsing is commonly
used in applications like live search, RSS feeds, weather updates, and news
portals. It allows faster communication between client and server and reduces
bandwidth usage.
9. Describe SAX Parser with example.
SAX (Simple API for XML) Parser is an event-based XML parser. It reads the
XML document sequentially from start to end and triggers events when it
encounters elements such as start tags, end tags, or character data. SAX does not
load the entire XML document into memory, making it very fast and memory-
efficient. It is suitable for large XML files. However, SAX does not allow random
access or modification of XML data. It is mainly used for reading and processing
data. SAX parsers are commonly used in server-side applications where
performance is critical.
10. Describe DOM Parser with example.
DOM (Document Object Model) Parser reads the entire XML document and
stores it in memory as a tree structure. Each element becomes a node in the tree,
making it easy to navigate, access, modify, or delete XML elements. DOM
provides flexibility and random access to data, which is useful for complex XML
operations. However, it consumes more memory compared to SAX, so it is not
ideal for large XML files. DOM parser is widely used in applications where XML
data needs to be edited or reused multiple times.
11. Write PHP program to find length of string.
In PHP, the length of a string is calculated using the built-in strlen() function. It
returns the total number of characters present in a string, including spaces. This
function is useful in validations such as checking password length or input limits.
<?php
$str = "Hello World";
echo strlen($str);
?>
12. Write PHP program to sort elements in ascending order.
PHP provides the sort() function to arrange array elements in ascending order. It
sorts values and reindexes the array. This function is commonly used for sorting
numbers or strings in programs.
<?php
$arr = array(4, 1, 3, 2);
sort($arr);
print_r($arr);
?>
13. Define PayPal Integration. Describe MySQL Login in PHP.
PayPal Integration allows websites to accept online payments securely using
PayPal services. It supports credit cards, debit cards, and PayPal wallets and is
widely used in e-commerce applications.
MySQL Login in PHP is used to authenticate users. PHP connects to a MySQL
database, verifies the entered username and password against stored records,
and grants access if credentials are correct. It is commonly used in login
systems.
14. Design student registration form in PHP and validate it.
A student registration form is created using HTML to collect details such as name,
email, password, and mobile number. PHP is used on the server side to validate
the form by checking empty fields, correct email format, and password length.
Validation prevents incorrect or malicious data from entering the database and
ensures data accuracy and security.
15. Define Regular Expression. Describe Error Handling in PHP.
Regular expressions are patterns used to match, search, or validate text such as
email IDs and phone numbers. PHP uses functions like preg_match() for regex
operations.
Error handling in PHP manages runtime errors using methods like
error_reporting(), try-catch blocks, and custom error handlers. It helps detect
errors and prevents application crashes.
16. Define Function. Write PHP program to find factorial using recursion.
A function is a reusable block of code that performs a specific task. Recursion is
a technique where a function calls itself until a base condition is met.
<?php
function factorial($n){
if($n<=1) return 1;
return $n * factorial($n-1);
}
echo factorial(5);
?>
17. Write PHP code for displaying data from MySQL in webpage.
PHP displays MySQL data by connecting to the database, executing a SELECT
query, fetching records using mysqli_fetch_assoc(), and printing them inside
HTML using loops. This technique is widely used in CRUD applications, reports,
and dashboards.
18. Describe AJAX RSS Feed with example.
An AJAX RSS Feed dynamically loads news or updates from an RSS XML file
without refreshing the page. AJAX requests fetch RSS data, parse XML, and
display headlines instantly. This improves website speed and provides real-time
content updates.
19. Describe PHP built-in functions with example.
PHP built-in functions are predefined functions that simplify programming.
Examples include strlen() for string length, date() for date and time, and count()
for array size.
Example:
echo date("d-m-Y");
20. Explain different data types in PHP with examples.
PHP supports various data types such as integer (numbers), float (decimal
values), string (text), Boolean (true/false), array (multiple values), and object
(class instances). Each data type is used to store specific kinds of data in
programs.
21. Write program to find average of first ten numbers using for loop.
A for loop is used to add numbers from 1 to 10. The total sum is then divided by
10 to calculate the average. This demonstrates loop usage and arithmetic
operations in PHP.
22. What do you mean by operator? Explain different types.
Operators are symbols used to perform operations on variables and values. PHP
supports arithmetic operators (+, -), relational operators (>, <), logical operators
(&&, ||), assignment operators (=), and comparison operators (==, !=). Operators
are essential for calculations and decision-making.
23. Describe SQL and explain different types of SQL commands.
SQL (Structured Query Language) is used to manage databases.
DDL commands create or modify tables, DML commands insert or update data,
DCL commands control access, and TCL commands manage transactions. SQL
helps store, retrieve, and manage data efficiently.
24. Define AJAX with advantages and disadvantages.
AJAX (Asynchronous JavaScript and XML) allows web pages to update content
without reloading. Advantages include fast response and improved user
experience. Disadvantages include complex debugging and browser dependency.
25. How to create a connection between PHP and MySQL?
PHP connects to MySQL using mysqli_connect() by providing server name,
username, password, and database name. A successful connection allows
execution of SQL queries for data operations.
26. What is function? List advantages and types of functions.
A function is a reusable block of code that performs a task. Advantages include
reduced code repetition, easy maintenance, and improved readability. Types of
functions in PHP include built-in functions and user-defined functions.
SECTION C
1. Describe about PHP Function Reference
PHP function reference explains how functions are defined, called, and how
arguments are passed to them. By default, PHP uses call by value, where a copy
of the variable is passed to the function. Any change made inside the function
does not affect the original variable. PHP also supports call by reference using
the & symbol. In call by reference, the function receives the memory address of
the variable, so changes inside the function directly modify the original value.
Function references are useful when working with large data structures like arrays
and objects, as they improve performance by avoiding unnecessary copying. PHP
function references help developers write reusable, efficient, and modular code.
2. Describe different types of Loops in PHP with example
Loops in PHP are used to execute a block of code repeatedly. The for loop is
used when the number of iterations is known in advance. The while loop executes
as long as a condition remains true. The do-while loop executes the code at least
once before checking the condition. The foreach loop is specially designed for
arrays and iterates through each element easily. Loops reduce code repetition,
improve efficiency, and make programs easier to maintain.
3. Write PHP program to find maximum and minimum number in given list
of elements
PHP provides built-in functions max () and min() to find the largest and smallest
values in an array. These functions simplify calculations and reduce code
complexity. They are commonly used in data analysis, result processing, and
report generation.
<?php
$numbers = array(12, 45, 7, 89, 34, 21);
$max = max($numbers);
$min = min($numbers);
echo "Given Numbers: " . implode(", ", $numbers) . "<br>";
echo "Maximum Number: " . $max . "<br>";
echo "Minimum Number: " . $min;
?>
4. Define Session. How to create and delete session
A session is used to store user information across multiple web pages. Sessions
are started using session_start() and data is stored in the $_SESSION array.
Sessions are deleted using session_unset() to remove variables and
session_destroy() to end the session. Sessions are widely used in login systems,
shopping carts, and user authentication
5. Define cookies and bug debugging. How to create and delete cookies in
PHP
Cookies store small pieces of data on the user’s browser. They are created using
setcookie() and deleted by setting their expiration time to the past. Bug debugging
is the process of identifying and fixing errors in programs using error messages,
logs, and debugging tools. Debugging improves code quality and reliability.
6. Describe about AJAX XML Parser
An AJAX XML Parser processes XML data received from a server
asynchronously without reloading the web page. JavaScript sends a request,
receives XML data, and parses it using DOM methods. Parsed data is displayed
dynamically on the webpage. This improves speed, reduces bandwidth usage, and
enhances user experience. AJAX XML parsing is commonly used in RSS feeds,
live updates, and search suggestions.
7. Describe about PHP functions for MySQL operation (mysql_connect,
mysql_fetch_array)
mysql_connect() is used to establish a connection between PHP and a MySQL
database server. mysql_fetch_array() retrieves records from the query result as an
array. These functions enable PHP applications to interact with databases,
retrieve data, and display results dynamically. (Note: These are deprecated and
replaced by mysqli/PDO in modern PHP.)
8. Describe about PHP login with example
PHP login systems authenticate users by verifying their credentials stored in a
database. PHP checks the entered username and password using SQL queries. If
valid, a session is created to maintain the login state. PHP login systems are used
in websites to protect secure pages and manage user access.
9. Describe about DOM Parser with example
DOM Parser reads the entire XML document into memory and represents it as a
tree structure. Each element becomes a node, allowing easy navigation,
modification, and deletion. DOM parser is flexible and suitable for small to
medium XML files but consumes more memory than SAX parser
10. Explain AJAX Auto-complete search with example
AJAX auto-complete search displays suggestions while the user types in a search
box. JavaScript sends partial input to the server, PHP processes the request, and
matching results are returned instantly. This feature improves user experience and
is commonly used in search engines and e-commerce websites.
11. Design and explain login page with suitable example
A login page contains input fields for username and password created using
HTML forms. PHP processes the submitted data, validates user credentials
against a database, and starts a session on successful login. It ensures secure
access to restricted areas of a website.
12. What is Inheritance? Explain different types of inheritance supported by
PHP
Inheritance allows a child class to acquire properties and methods of a parent
class. PHP supports single inheritance, multilevel inheritance, and
hierarchical inheritance. Inheritance improves code reusability, organization,
and maintainability.
13. What are forms? Explain different form fields in detail
Forms are used to collect user input in web applications. Common form fields
include text box, password field, radio button, checkbox, text area, select box,
and submit button. PHP processes form data using GET or POST methods. Forms
are essential for user interaction.
14. Explain XML and DOM parser
XML is a markup language used to store and transport data. DOM parser reads
XML into a tree structure, allowing easy access and manipulation of elements. It
is suitable for applications requiring frequent data access and modification.
15. Write PHP program to print factorial of a given number
Factorial of a number is the product of all positive integers from 1 to that number.
It is represented as n!. For example, factorial of 5 is 5 × 4 × 3 × 2 × 1 = 120. In
PHP, factorial can be calculated using a loop or a recursive function. This
program shows the use of loops and conditional statements.
PHP Program:
<?php
$num = 5;
$fact = 1;
for($i = 1; $i <= $num; $i++) {
$fact = $fact * $i;
}
echo "Factorial of $num is $fact";
?>
This program initializes a variable, multiplies numbers using a loop, and prints
the result.
16. Illustrate call by value and call by reference in PHP
In call by value, a copy of the variable is passed to the function. Any change
made inside the function does not affect the original variable. It is safe but uses
more memory.
In call by reference, the address of the variable is passed using the & symbol.
Changes made inside the function directly affect the original variable. It is faster
and memory-efficient, especially for large data.
Example:
function addValue($x) {
$x += 5;
}
function addReference(&$y) {
$y += 5;
}
$a = 10;
addValue($a); // $a remains 10
addReference($a); // $a becomes 15
17. Explain error handling and bug debugging in PHP
Error handling in PHP manages runtime errors and prevents program crashes.
PHP provides functions like error_reporting() to display errors, and try-catch
blocks to handle exceptions. Custom error handlers can also be created using
set_error_handler().
Bug debugging is the process of finding and fixing logical, syntax, or runtime
errors in a program. PHP debugging tools include echo, print_r(), var_dump(),
and error logs. Debugging helps developers understand program flow and correct
mistakes.
Proper error handling and debugging improve program reliability, security, and
performance.
18. Explain files and I/O. Explain file uploading process in PHP with HTTP
File Input/Output (I/O) in PHP refers to reading from and writing data to files.
PHP provides functions like fopen(), fread(), fwrite(), and fclose() for file
operations.
File uploading allows users to send files from their system to the server through
an HTML form using the HTTP POST method. PHP stores uploaded file details
in the $_FILES array. The function move_uploaded_file() is used to store the
uploaded file in a server directory securely.
File uploading is widely used in applications like profile photo upload, document
submission, and media sharing.
19. What is the concept of master page? Explain partial page update
A master page defines a common layout for multiple web pages, such as header,
footer, and navigation menu. It ensures consistency and reduces code duplication
across pages.
Partial page update refreshes only a specific part of a webpage instead of
reloading the entire page. It is implemented using AJAX technology. Only the
required data is fetched from the server, improving speed and user experience.
Master pages and partial updates are commonly used in modern web applications.
20. Write short note on XML Parser
An XML parser is used to read and process XML documents. It converts XML
data into a readable structure for applications. The two main types are SAX and
DOM parsers.
SAX parser reads XML sequentially and is fast and memory-efficient. DOM
parser loads the entire XML document into memory as a tree structure, allowing
easy navigation and modification but consuming more memory.
XML parsers are used in data exchange, web services, and configuration files.
21. Write short note on Array
An array is a data structure that stores multiple values in a single variable. PHP
supports three types of arrays: indexed arrays, associative arrays, and
multidimensional arrays. Indexed arrays use numeric keys, associative arrays
use named keys, and multidimensional arrays store arrays inside arrays.
Arrays help manage large sets of data efficiently and are widely used in PHP
applications.
22. Write short note on insertion and deletion of data using PHP
Insertion and deletion are database operations performed using SQL queries in
PHP. Insertion adds new records into a database using the INSERT command,
while deletion removes existing records using the DELETE command.
PHP connects to the database, executes these queries, and updates records
dynamically. These operations are commonly used in CRUD (Create, Read,
Update, Delete) applications.
23. Write short note on PayPal Integration
PayPal Integration allows websites to accept online payments securely using
PayPal services. It supports credit cards, debit cards, and PayPal wallets. PayPal
provides APIs that developers use to integrate payment functionality into
applications.
It offers secure transactions, multi-currency support, and fraud protection,
making it popular for e-commerce websites and online services.
1️⃣ PHP Basics and Features
(Input, Array, String, Indexing)
PHP is a server-side scripting language used to develop dynamic and interactive
websites. It executes on the server and sends the result to the client browser. PHP
is open-source, platform-independent, and easily integrated with HTML and
databases like MySQL.
Input Handling: PHP receives user input using super global arrays such as
$_GET, $_POST, and $_REQUEST. $_POST is more secure and commonly used
for form data.
Arrays: Arrays store multiple values in a single variable. PHP supports indexed
arrays, associative arrays, and multidimensional arrays.
1️⃣ Indexed Array
An indexed array stores elements with numeric indexes, starting from 0 by
default.
Features:
Index is automatically assigned
Used when data is in sequence
2⃣ Associative Array
An associative array uses named keys (string keys) instead of numeric indexes.
Features:
Each value is associated with a unique key
Easy to understand and readable
3️⃣ Multidimensional Array
A multidimensional array contains one or more arrays inside another array.
Features:
Used to store complex data
Supports table-like structure
Strings: Strings are sequences of characters. Common string functions include
strlen(), strpos(), and substr().
Indexing: Array elements are accessed using index numbers or keys.
Example:
$arr = array("A","B");
echo $arr[0];
2⃣ AJAX (Asynchronous JavaScript and XML)
AJAX is a web development technique used to create fast and dynamic web
applications. It allows web pages to send and receive data from a server without
reloading the entire page, improving performance and user experience.
AJAX uses JavaScript along with the XMLHttpRequest object to communicate
with the server. Data can be exchanged in XML, JSON, or plain text format.
Working of AJAX:
1. User triggers an event (click or input)
2. JavaScript sends a request to the server
3. Server processes the request
4. Response is returned asynchronously
Advantages:
Faster response time
Reduced server load
Improved user experience
Applications:
Live search, form validation, auto-refresh content.
3️⃣ Error Handling in PHP
Error handling in PHP is used to detect, manage, and handle runtime errors
that occur during program execution. Proper error handling improves reliability
and prevents application crashes.
Types of Errors:
Notice: Minor issues
Warning: Non-fatal errors
Fatal Error: Script termination
Error Handling Techniques:
error_reporting()
set_error_handler()
try-catch block for exceptions
Example:
try {
throw new Exception("Error occurred");
}
catch(Exception $e) {
echo $e->getMessage();
}
Importance:
Improves code quality
Simplifies debugging
Enhances application stability
4️⃣ Debugging in PHP
Debugging is the process of finding and correcting errors or bugs in a PHP
program. It helps ensure that the application behaves as expected.
Debugging Methods:
Using echo and print statements
Using var_dump() and print_r()
Viewing error logs
Debugging tools like Xdebug
Example:
var_dump($variable);
Benefits:
Identifies logical errors
Improves program accuracy
Saves development time
Difference from Error Handling:
Debugging finds errors, while error handling manages them during execution.
5️⃣ MySQL
MySQL is an open-source relational database management system (RDBMS)
used to store and manage structured data. It uses Structured Query Language
(SQL) for database operations.
Features:
Fast and reliable
Secure data handling
Supports large databases
Basic Operations:
Create and manage databases
Insert, update, delete records
Retrieve data using SQL queries
Example:
SELECT * FROM student;
Uses:
Web applications, enterprise systems, CMS platforms.
6️⃣ XML (Extensible Markup Language)
XML is a markup language used for storing and transporting data in a structured
and self-descriptive format. It allows users to define their own tags.
Features:
Platform independent
Case sensitive
Hierarchical structure
Difference from HTML:
XML stores data, while HTML displays data.
Example:
<student>
<name>Akabhay</name>
</student>
Advantages:
Easy data sharing
Supports data validation
Widely used in web services
7️⃣ SQL Commands
SQL (Structured Query Language) is used to create, manipulate, and control
databases.
Types of SQL Commands:
DDL: CREATE, DROP, ALTER
DML: INSERT, UPDATE, DELETE
DQL: SELECT
DCL: GRANT, REVOKE
TCL: COMMIT, ROLLBACK
Example:
INSERT INTO student VALUES(1,'Akash');
Importance:
Efficient data management
Ensures data integrity
8️⃣ RSS Feed
RSS (Really Simple Syndication) is a web feed format used to deliver frequently
updated content such as news, blogs, and podcasts automatically to users.
RSS is based on XML and allows users to receive updates without visiting
websites repeatedly.
Features:
Automatic updates
Time-saving
XML-based structure
RSS Structure:
<channel>
<item>
<title>
<link>
Uses:
News websites, blogs, online magazines.
Feature GET POST
Data location URL Request body
Visibility Visible Hidden
Security Low High
Data size Limited Large
Bookmarking Yes No
PHP variable $_GET $_POST
Best for Search Forms with sensitive data
3️⃣ Difference Between Forms and Frames
Feature Forms Frames
Purpose Collect user data Display another page
User interaction Yes No (mostly)
Server interaction Yes No
HTML tag <form> <iframe>
Example use Login form YouTube embed
Feature Session Cookies
Definition Session stores user data on Cookies store user data on the
the server client (browser)
Storage Server-side Client-side
location
Security More secure Less secure
Data size Larger (server dependent) Limited (≈4 KB)
Lifetime Ends when browser closes Can persist after browser closes
(by default)
Expiry control Automatic or manual Set using expiry time
Accessibility Only on server Accessible by browser & server
Speed Slightly slower Faster
PHP variable $_SESSION $_COOKIE
Suitable for Login sessions, Remember me, preferences
authentication
Risk of Low High
hacking