SlideShare a Scribd company logo
PHP
Server Side Scripting Language
Introduction Of PHP
ļ‚§ PHP is a recursive acronym for "PHP: Hypertext Preprocessorā€œ or ā€œPersonal
Home Pageā€.
ļ‚§ PHP is a server side scripting language that is embedded in HTML. It is used to
manage dynamic content, databases, session tracking, even build entire e-
commerce sites.
ļ‚§ It is integrated with a number of popular databases, including MySQL,
PostgreSQL, Oracle, blockchain, and Microsoft SQL Server.
Common use Of PHP
ļ‚§ PHP performs system functions, i.e. from files on a system it can create,
open, read, write, and close them.
ļ‚§ PHP can handle forms, i.e. gather data from files, save data to a file,
through email you can send data, return data to the user.
ļ‚§ You add, delete, modify elements within your database through PHP.
ļ‚§ Using PHP, you can restrict users to access some pages of your website.
ļ‚§ It can encrypt data.
Feature And Advantages of PHP
ļ‚§ Simple
ļ‚§ Interpreted
ļ‚§ Faster
ļ‚§ Open Source
ļ‚§ Platform Independent
ļ‚§ Efficiency
ļ‚§ Flexibility
What Can PHP Do?
ļ‚§ PHP can generate dynamic page content
ļ‚§ PHP can create, open, read, write, delete, and close files on the server
ļ‚§ PHP can collect form data
ļ‚§ PHP can send and receive cookies
ļ‚§ PHP can add, delete, modify data in your database
ļ‚§ PHP can be used to control user-access
ļ‚§ PHP can encrypt data
Why PHP?
ļ‚§ PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
ļ‚§ PHP is compatible with almost all servers used today (Apache)
ļ‚§ PHP supports a wide range of databases
ļ‚§ PHP is free PHP is easy to learn and runs efficiently on the server side
PHP Syntax
ļ‚§ A PHP Script is always executed at server side ,and browser gets the plain HTML
result in response.
ļ‚§ The Location of PHP Script can be anywhere in document in the document.
ļ‚§ The PHP Parsing engine requires a method to distinguish PHP code from other
script in the page. This is called escaping to PHP.
ļ‚§ The PHP Script start with <?php and ends with ?>
Syntax
<?php
PHP Statement;
?>
Extension Of PHP
ļ‚§ . Php is the extension for PHP Files.
ļ‚§ A PHP is Combination of PHP script with HTML Tags.
Simple Program to display Hello Message in PHP
ļ‚§ <?php
echo "<h2>PHP is Fun!</h2>";
echo "Hello world!<br>";
echo "I'm about to learn PHP!<br>";
echo "This ", "string ", "was ", "made ", "with multiple parameters.";
?>
The echo statement can be used with or without parentheses: echo or echo().
PHP Comments
<?php
// This is a single-line comment
# This is also a single-line comment
/*
This is a multiple-lines comment block
that spans over multiple
lines
*/
// You can also use comments to leave out parts of a code line
$x = 5 /* + 15 */ + 5;
echo $x;
?>
Variables in PHP
ļ‚§ Definition: A Variable is the Name Given to memory Location where we can
store some Value . The Value depends upon the data type of the variable.
ļ‚§ Declaration: In PHP we declare Variables by using ā€œ$ ā€œ symbol without
assigning the data type. The Data type of variable is decided by the PHP
parsing engine when value is assigned to it.
Example of Variable Declaration
<?php
$txt = "Hello world!";
$x = 5;
$y = 10.5;
echo $txt;
echo "<br>";
echo $x;
echo "<br>";
echo $y;
?>
Addition Of two Numbers
<?php
$no1=12;
$no2=19;
$sum=$no1+$no2;
echo"Summation is:-".$sum;
?>
Conditions and Loops
Control Structure
If
If else
While
Do While
Else If ladder
Switch case
For
For each
Function
ļ‚§ The Concept Of Programing is Same of any other Programming Language.
ļ‚§ Definition: A function is a block of statements related to such a task which
we want to execute repeatedly in our program.
ļ‚§ A function can take arguments and also can return value.
ļ‚§ Up till now we have seen the function echo().
ļ‚§ This is built in function of php.
ļ‚§ Now We will create our own user defined function.
ļ‚§ Related to functions there are two important points:
ļ‚§ 1Creating a PHP Function.
ļ‚§ 2. Calling a PHP Function
Function Syntax
function function_name (parameters)
{
Statements;
}
Sample Program of function
<?php
function printmsg()
{
echo "hello welcome";
}
printmsg();
?>
Passing Arguments Through Function
<?php
function summation($n1,$n2)
{
$n3=$n1+$n2;
echo "Summation is:-".$n3;
}
summation(10,20);
?>
Passing Argument by Reference
<?php
function summation(&$num)
{
$num += 5;
}
$num=10;
echo "$num<br>";
summation($num);
echo "$numā€œ;
?>
Form Handling
ļ‚§ When you login into a website or into your mail box, you are interacting
with a form.
ļ‚§ Forms are used to get input from the user and submit it to the web server for
processing.
ļ‚§ A form is an HTML tag that contains graphical user interface items such as
input box, check boxes radio buttons etc.
ļ‚§ The diagram below illustrates the form handling process.
PHP.pptx is the Best Explanation of ppts
THANK YOU

More Related Content

DOCX
PHP NOTES FOR BEGGINERS
PDF
WT_PHP_PART1.pdf
PDF
Introduction to PHP - Basics of PHP
PPTX
PDF
chapter 5 Server-Side Scripting (PHP).pdf
PPTX
PHP
PPT
Php Tutorial
PPT
PHP - Introduction to PHP Fundamentals
PHP NOTES FOR BEGGINERS
WT_PHP_PART1.pdf
Introduction to PHP - Basics of PHP
chapter 5 Server-Side Scripting (PHP).pdf
PHP
Php Tutorial
PHP - Introduction to PHP Fundamentals

Similar to PHP.pptx is the Best Explanation of ppts (20)

PPTX
PHP
PPTX
Introduction to PHP from Beginning to End
PPT
Php basics
PPTX
Php unit i
PPTX
PHP2An introduction to Gnome.pptx.j.pptx
PPTX
PHP ITCS 323
PPTX
php basics
PDF
Php tutorial(w3schools)
PDF
Php tutorialw3schools
PPTX
introduction to php and its uses in daily
PDF
PPT
PDF
waptLab 04.pdfwaptLab09 tis lab is used for college lab exam
PPTX
PHP Hypertext Preprocessor
PDF
Php notes
PDF
Php introduction
PPTX
Introduction to-php
DOCX
PHP.docx
PDF
1336333055 php tutorial_from_beginner_to_master
PPTX
Php
PHP
Introduction to PHP from Beginning to End
Php basics
Php unit i
PHP2An introduction to Gnome.pptx.j.pptx
PHP ITCS 323
php basics
Php tutorial(w3schools)
Php tutorialw3schools
introduction to php and its uses in daily
waptLab 04.pdfwaptLab09 tis lab is used for college lab exam
PHP Hypertext Preprocessor
Php notes
Php introduction
Introduction to-php
PHP.docx
1336333055 php tutorial_from_beginner_to_master
Php
Ad

More from AkhileshPansare (17)

PPTX
chapter-1-1.pptxmsdsdvsdvnsdvndsvdvds i.
PPTX
Addddkddjddkddd ddddndjsChapter 4-1.pptx
PPTX
Software Specifications with details exp
PPTX
DOC-20230408-WA0002..pptx
PDF
Ak.pdf
PPTX
pra Project pages ppt.
PPTX
IIM MICRO PROJE.pptx
PPTX
Acc Project pages.pptx
PPTX
BCC MICRO PROJECT.pptx
PPTX
DOC-20230408-WA0002..pptx
PPTX
DOC-20230408-WA0002..pptx
PPTX
Airbags in automobile.pptx
PPTX
EP848-PowerpointFa bearing.pptx
PPTX
EP848-PowerpointFa.pptx
PDF
Force and Motion PowerPoint.pdf
PPTX
Artificial%20Intelligence%20Introduction.pptx
PDF
csca0101_ch01 (1).pdf
chapter-1-1.pptxmsdsdvsdvnsdvndsvdvds i.
Addddkddjddkddd ddddndjsChapter 4-1.pptx
Software Specifications with details exp
DOC-20230408-WA0002..pptx
Ak.pdf
pra Project pages ppt.
IIM MICRO PROJE.pptx
Acc Project pages.pptx
BCC MICRO PROJECT.pptx
DOC-20230408-WA0002..pptx
DOC-20230408-WA0002..pptx
Airbags in automobile.pptx
EP848-PowerpointFa bearing.pptx
EP848-PowerpointFa.pptx
Force and Motion PowerPoint.pdf
Artificial%20Intelligence%20Introduction.pptx
csca0101_ch01 (1).pdf
Ad

Recently uploaded (20)

PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
PPTX
SAP 2 completion done . PRESENTATION.pptx
PPTX
Leprosy and NLEP programme community medicine
PPT
Predictive modeling basics in data cleaning process
PDF
Clinical guidelines as a resource for EBP(1).pdf
PDF
Optimise Shopper Experiences with a Strong Data Estate.pdf
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
PPTX
Supervised vs unsupervised machine learning algorithms
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PPT
Reliability_Chapter_ presentation 1221.5784
PPTX
Introduction to Knowledge Engineering Part 1
PDF
Introduction to the R Programming Language
PDF
Introduction to Data Science and Data Analysis
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PDF
annual-report-2024-2025 original latest.
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PDF
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
oil_refinery_comprehensive_20250804084928 (1).pptx
SAP 2 completion done . PRESENTATION.pptx
Leprosy and NLEP programme community medicine
Predictive modeling basics in data cleaning process
Clinical guidelines as a resource for EBP(1).pdf
Optimise Shopper Experiences with a Strong Data Estate.pdf
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
Supervised vs unsupervised machine learning algorithms
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
Reliability_Chapter_ presentation 1221.5784
Introduction to Knowledge Engineering Part 1
Introduction to the R Programming Language
Introduction to Data Science and Data Analysis
Qualitative Qantitative and Mixed Methods.pptx
annual-report-2024-2025 original latest.
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
IB Computer Science - Internal Assessment.pptx
Data_Analytics_and_PowerBI_Presentation.pptx
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...

PHP.pptx is the Best Explanation of ppts

  • 2. Introduction Of PHP ļ‚§ PHP is a recursive acronym for "PHP: Hypertext Preprocessorā€œ or ā€œPersonal Home Pageā€. ļ‚§ PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic content, databases, session tracking, even build entire e- commerce sites. ļ‚§ It is integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle, blockchain, and Microsoft SQL Server.
  • 3. Common use Of PHP ļ‚§ PHP performs system functions, i.e. from files on a system it can create, open, read, write, and close them. ļ‚§ PHP can handle forms, i.e. gather data from files, save data to a file, through email you can send data, return data to the user. ļ‚§ You add, delete, modify elements within your database through PHP. ļ‚§ Using PHP, you can restrict users to access some pages of your website. ļ‚§ It can encrypt data.
  • 4. Feature And Advantages of PHP ļ‚§ Simple ļ‚§ Interpreted ļ‚§ Faster ļ‚§ Open Source ļ‚§ Platform Independent ļ‚§ Efficiency ļ‚§ Flexibility
  • 5. What Can PHP Do? ļ‚§ PHP can generate dynamic page content ļ‚§ PHP can create, open, read, write, delete, and close files on the server ļ‚§ PHP can collect form data ļ‚§ PHP can send and receive cookies ļ‚§ PHP can add, delete, modify data in your database ļ‚§ PHP can be used to control user-access ļ‚§ PHP can encrypt data
  • 6. Why PHP? ļ‚§ PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.) ļ‚§ PHP is compatible with almost all servers used today (Apache) ļ‚§ PHP supports a wide range of databases ļ‚§ PHP is free PHP is easy to learn and runs efficiently on the server side
  • 7. PHP Syntax ļ‚§ A PHP Script is always executed at server side ,and browser gets the plain HTML result in response. ļ‚§ The Location of PHP Script can be anywhere in document in the document. ļ‚§ The PHP Parsing engine requires a method to distinguish PHP code from other script in the page. This is called escaping to PHP. ļ‚§ The PHP Script start with <?php and ends with ?>
  • 9. Extension Of PHP ļ‚§ . Php is the extension for PHP Files. ļ‚§ A PHP is Combination of PHP script with HTML Tags.
  • 10. Simple Program to display Hello Message in PHP ļ‚§ <?php echo "<h2>PHP is Fun!</h2>"; echo "Hello world!<br>"; echo "I'm about to learn PHP!<br>"; echo "This ", "string ", "was ", "made ", "with multiple parameters."; ?> The echo statement can be used with or without parentheses: echo or echo().
  • 11. PHP Comments <?php // This is a single-line comment # This is also a single-line comment /* This is a multiple-lines comment block that spans over multiple lines */ // You can also use comments to leave out parts of a code line $x = 5 /* + 15 */ + 5; echo $x; ?>
  • 12. Variables in PHP ļ‚§ Definition: A Variable is the Name Given to memory Location where we can store some Value . The Value depends upon the data type of the variable. ļ‚§ Declaration: In PHP we declare Variables by using ā€œ$ ā€œ symbol without assigning the data type. The Data type of variable is decided by the PHP parsing engine when value is assigned to it.
  • 13. Example of Variable Declaration <?php $txt = "Hello world!"; $x = 5; $y = 10.5; echo $txt; echo "<br>"; echo $x; echo "<br>"; echo $y; ?>
  • 14. Addition Of two Numbers <?php $no1=12; $no2=19; $sum=$no1+$no2; echo"Summation is:-".$sum; ?>
  • 15. Conditions and Loops Control Structure If If else While Do While Else If ladder Switch case For For each
  • 16. Function ļ‚§ The Concept Of Programing is Same of any other Programming Language. ļ‚§ Definition: A function is a block of statements related to such a task which we want to execute repeatedly in our program. ļ‚§ A function can take arguments and also can return value. ļ‚§ Up till now we have seen the function echo(). ļ‚§ This is built in function of php. ļ‚§ Now We will create our own user defined function. ļ‚§ Related to functions there are two important points: ļ‚§ 1Creating a PHP Function. ļ‚§ 2. Calling a PHP Function
  • 17. Function Syntax function function_name (parameters) { Statements; }
  • 18. Sample Program of function <?php function printmsg() { echo "hello welcome"; } printmsg(); ?>
  • 19. Passing Arguments Through Function <?php function summation($n1,$n2) { $n3=$n1+$n2; echo "Summation is:-".$n3; } summation(10,20); ?>
  • 20. Passing Argument by Reference <?php function summation(&$num) { $num += 5; } $num=10; echo "$num<br>"; summation($num); echo "$numā€œ; ?>
  • 21. Form Handling ļ‚§ When you login into a website or into your mail box, you are interacting with a form. ļ‚§ Forms are used to get input from the user and submit it to the web server for processing. ļ‚§ A form is an HTML tag that contains graphical user interface items such as input box, check boxes radio buttons etc. ļ‚§ The diagram below illustrates the form handling process.