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

PDF
Introduction to PHP - Basics of PHP
PPTX
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
PDF
Wt unit 4 server side technology-2
PDF
PHP in Web development and Applications.pdf
PPTX
Introduction to php
PPTX
php Chapter 1.pptx
PPTX
PHP ITCS 323
PPTX
introduction to php and its uses in daily
Introduction to PHP - Basics of PHP
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Wt unit 4 server side technology-2
PHP in Web development and Applications.pdf
Introduction to php
php Chapter 1.pptx
PHP ITCS 323
introduction to php and its uses in daily

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

PPTX
Introduction to PHP.pptx
PDF
Materi Dasar PHP
PPTX
Php unit i
PPTX
Web Application Development using PHP Chapter 1
DOCX
PHP NOTES FOR BEGGINERS
PDF
Introduction of PHP.pdf
PPTX
Php.ppt
PDF
Web Development Course: PHP lecture 1
PDF
WT_PHP_PART1.pdf
PPTX
INTRODUCTION ON PHP - SERVER SIDE SCRIPTING LANGUAGE
PPTX
PPT
INTRODUCTION TO PHP.ppt
PPTX
PHP stand for PHP Hypertext Preprocessor
PPTX
FYBSC IT Web Programming Unit IV PHP and MySQL
PPTX
INTRODUCTION to php.pptx
PPTX
Php Unit 1
PPTX
Lecture 6: Introduction to PHP and Mysql .pptx
Introduction to PHP.pptx
Materi Dasar PHP
Php unit i
Web Application Development using PHP Chapter 1
PHP NOTES FOR BEGGINERS
Introduction of PHP.pdf
Php.ppt
Web Development Course: PHP lecture 1
WT_PHP_PART1.pdf
INTRODUCTION ON PHP - SERVER SIDE SCRIPTING LANGUAGE
INTRODUCTION TO PHP.ppt
PHP stand for PHP Hypertext Preprocessor
FYBSC IT Web Programming Unit IV PHP and MySQL
INTRODUCTION to php.pptx
Php Unit 1
Lecture 6: Introduction to PHP and Mysql .pptx
Ad

More from AkhileshPansare (15)

PPTX
Software Specifications with details exp
PPTX
DOC-20230408-WA0002..pptx
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
Software Specifications with details exp
DOC-20230408-WA0002..pptx
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
lec_5(probability).pptxzzjsjsjsjsjsjjsjjssj
PPTX
CL11_CH20_-LOCOMOTION-AND-MOVEMENT-Autosaved.pptx
PDF
Chad Readey - An Independent Thinker
PPTX
Understanding Prototyping in Design and Development
PPTX
Business Acumen Training GuidePresentation.pptx
PDF
Digital Infrastructure – Powering the Connected Age
PDF
Company Presentation pada Perusahaan ADB.pdf
PPTX
LESSON-1-NATURE-OF-MATHEMATICS.pptx patterns
PPTX
Logistic Regression ml machine learning.pptx
PPTX
Purple and Violet Modern Marketing Presentation (1).pptx
PPTX
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
PPTX
Extract Transformation Load (3) (1).pptx
PPTX
Major-Components-ofNKJNNKNKNKNKronment.pptx
PPTX
PPT_Dream_45_NEET_Organic_Chemistry_Pankaj_Sijariya_Sir_Sanjeet.pptx
PPTX
1intro to AI.pptx AI components & composition
PPTX
artificial intelligence deeplearning-200712115616.pptx
PPTX
Moving the Public Sector (Government) to a Digital Adoption
PDF
Data Analyst Certificate Programs for Beginners | IABAC
PPTX
Lecture 1 Intro in Inferential Statistics.pptx
PPTX
Azure Data management Engineer project.pptx
lec_5(probability).pptxzzjsjsjsjsjsjjsjjssj
CL11_CH20_-LOCOMOTION-AND-MOVEMENT-Autosaved.pptx
Chad Readey - An Independent Thinker
Understanding Prototyping in Design and Development
Business Acumen Training GuidePresentation.pptx
Digital Infrastructure – Powering the Connected Age
Company Presentation pada Perusahaan ADB.pdf
LESSON-1-NATURE-OF-MATHEMATICS.pptx patterns
Logistic Regression ml machine learning.pptx
Purple and Violet Modern Marketing Presentation (1).pptx
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
Extract Transformation Load (3) (1).pptx
Major-Components-ofNKJNNKNKNKNKronment.pptx
PPT_Dream_45_NEET_Organic_Chemistry_Pankaj_Sijariya_Sir_Sanjeet.pptx
1intro to AI.pptx AI components & composition
artificial intelligence deeplearning-200712115616.pptx
Moving the Public Sector (Government) to a Digital Adoption
Data Analyst Certificate Programs for Beginners | IABAC
Lecture 1 Intro in Inferential Statistics.pptx
Azure Data management Engineer project.pptx

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.