SlideShare a Scribd company logo
By dharmendra kumar dhakar
Roll no:12115029
NIT RAIPUR
Introduction
Php is stands for php: hypertext pre-processor
Widely used open source scripting language
Server-side scripting language
Embedded with html
 current version of php is 5.5.15 released on 24
july 2014.
What is scripting language
 Scripting languages abstract their users from variable
types and memory management
 no need to compile
 A scripting language is usually interpreted from source
code to bytecode
Client server model of php
Server side scripting
 it is a technique used in web design
 involves embedding script in html source code
 before respond to client , server execute server –side
script and produce equivalent HTML code
 server side scripting is different from client side
scripting. For example javascript runs on brower.
Importance of php in web development
open source
Cross platform architecture
 Intergated with a wider range of database like oracle
mysql ,ms access etc.
It supports various servers like Apache ,IIS etc.
Aache is best suited for executing PHP scripts
PHP program structure
<?php
//php code goes here
?>
 “.php” is default file extension for PHP
 PHP file contains PHP scripting code and HTML tags
Variables in PHP
 Used for storing value
 Can hold any type of value, no data type
 Starts with $ sign and preceded by name of
variable
 name of variable are case sensitive
Built in variable
$_GET-used for retrieving form element ,also used
for fetching value of variable through URL
 $_POST:-HTTP post variable used for retrieving form
element
$_SESSION :-used for creating session variable
$_COOKIE :-used for cookie manipulation
Combining HTML and PHP
<html>
<head></head>
<body>
<?php
echo “hello”;
?>
</body>
</html>
PHP functions
 function keyword is used to create a function
 Syntax
function fun_name(parameter){
//some code
return some_value;
}
PHP ‘include’ and ‘requir’
 used to include content of one file into another
Syntax
<?php include “header.php”;
//some code
include “footer.php”
?>
PHP array
 special variable that can hold multiple values at a time
 Indexed array: array with numeric index
 Associative array: element are accessed by keys instead of
numeric index
 multidimensional array: An array that can contain
another array as value
 array() function is used to create an array cont…
PHP array
 syntax
$arr=array(1,2,3,4,5); //indexed array
$arr=array(1=>2,4=>6,5=>7)//associative array
$a=array(1=>array(1,2,3,4,5))//multidimentiona
l
PHP arrays
 foreach loop:-special loop used for arrays
 syntax to access array element
foreach($arr as $value){
echo $value; //for indexed array
}
 to access element of associative array
PHP array
foreach($arr as $key=>$value)
{
echo “value at”.$key.”is”.$value;
}
 array_pop() function is used to delete the last
element of an array
MYSQL
 Mysql is a database and defines structure for storing
information.
 MYSQL is used to perform database related
operation.
 Can be integrated with php.
 open source database server.
Connecting to mysql
 In PHP connection is established using mysql_connect()
function
 syntax:
mysql_connect(servername,username,database
password);
example:-
<?php
$ conn=mysql_connect(“localhost”,”root”,””)
// some code
?>
Closing MYSQL connection
connection use the mysql_closeTo close the () function
 example
<php $db=mysql_connect(“localhost”,”root”,””);
if(!$db) die(“cannot connet to mysal”);
else
//some code
mysql_close($db);
?>
session
 contains information about same user between different
web pages for a particular application
 session_start() function is used to start session
 $_SESSION variable is used to create session variable
<?php session_start()
$_SESSION[‘uname’]=“shyam”;
?>
session
 session_destroy() function is use to destroy session variable
<?php
session_start();
$_SESSION[‘uname’]=$_POST[‘name’];
// some code
session_destroy() //destroy the session
?>
cookie
 often used to identify user
 cookie is a small file which server embeds on user’s system
 whenever same system request a webpage it sends cookie
too
 creating a cookie
setcookie(‘name’,value’,expire,path,domain,security)
cookie
 $_COOKIE variable is used to retrieve cookie
<?php setcookie(“name”, ”shyam” date()+12*60*60);
echo $_COOKIE[‘name’];
?>
 session is better option of cookie
Php technical presentation

More Related Content

PPT
01 Php Introduction
PDF
Php introduction
PDF
Introduction to php
PPTX
Php.ppt
PPT
PHP complete reference with database concepts for beginners
PPTX
Express js
PPTX
PHP Presentation
01 Php Introduction
Php introduction
Introduction to php
Php.ppt
PHP complete reference with database concepts for beginners
Express js
PHP Presentation

What's hot (20)

PPTX
PPT
Php with MYSQL Database
PPT
Php Presentation
PPTX
Apache web server
PPTX
Introduction to MERN Stack
PPTX
jQuery
PPSX
Php and MySQL
PPTX
Server side rendering review
PPT
Introduction To PHP
PPTX
Python/Flask Presentation
PPTX
PPTX
PPTX
Laravel Tutorial PPT
PPTX
Flask – Python
PPTX
Laravel overview
PPT
Java Script ppt
PPTX
Django Girls Tutorial
PPTX
Bootstrap PPT by Mukesh
PPT
Php Ppt
Php with MYSQL Database
Php Presentation
Apache web server
Introduction to MERN Stack
jQuery
Php and MySQL
Server side rendering review
Introduction To PHP
Python/Flask Presentation
Laravel Tutorial PPT
Flask – Python
Laravel overview
Java Script ppt
Django Girls Tutorial
Bootstrap PPT by Mukesh
Php Ppt
Ad

Viewers also liked (11)

PDF
Beginning web programming with PHP [PHP 101-02]
PDF
Php tutorial from_beginner_to_master
PDF
Phing: Building with PHP
PPTX
PHP presentation - Com 585
PPTX
Technical Seminar PPT
PPT
Shift Happens
PPT
THIRST
PDF
Foot Notes
PDF
SMOKE - The Convenient Truth [1st place Worlds Best Presentation Contest] by ...
PDF
Healthcare Napkins All
PDF
Death by PowerPoint
Beginning web programming with PHP [PHP 101-02]
Php tutorial from_beginner_to_master
Phing: Building with PHP
PHP presentation - Com 585
Technical Seminar PPT
Shift Happens
THIRST
Foot Notes
SMOKE - The Convenient Truth [1st place Worlds Best Presentation Contest] by ...
Healthcare Napkins All
Death by PowerPoint
Ad

Similar to Php technical presentation (20)

PPTX
Web Application Development using PHP Chapter 1
PPTX
PHP Hypertext Preprocessor
PDF
Hsc IT 5. Server-Side Scripting (PHP).pdf
PPTX
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
PDF
Lesson-5-php BY AAFREEN SHAIKH.pdf HSC INFORMATION TECHNOLOGY CHAP 5 PHP
PPT
PHP MySQL Workshop - facehook
PDF
chapter 5 Server-Side Scripting (PHP).pdf
PPTX
PHP ITCS 323
PDF
Introduction to PHP - Basics of PHP
PPT
php 1
PPTX
Unit 4-6 sem 7 Web Technologies.pptx
PDF
Lecture2_IntroductionToPHP_Spring2023.pdf
PPTX
Introduction to PHP.pptx
PPT
PHP - Introduction to PHP Fundamentals
PPTX
Introduction to php
PPTX
PHP.pptx is the Best Explanation of ppts
DOCX
Php interview questions
PDF
PHP in Web development and Applications.pdf
PPT
Web Application Development using PHP Chapter 1
PHP Hypertext Preprocessor
Hsc IT 5. Server-Side Scripting (PHP).pdf
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Lesson-5-php BY AAFREEN SHAIKH.pdf HSC INFORMATION TECHNOLOGY CHAP 5 PHP
PHP MySQL Workshop - facehook
chapter 5 Server-Side Scripting (PHP).pdf
PHP ITCS 323
Introduction to PHP - Basics of PHP
php 1
Unit 4-6 sem 7 Web Technologies.pptx
Lecture2_IntroductionToPHP_Spring2023.pdf
Introduction to PHP.pptx
PHP - Introduction to PHP Fundamentals
Introduction to php
PHP.pptx is the Best Explanation of ppts
Php interview questions
PHP in Web development and Applications.pdf

Recently uploaded (20)

DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Well-logging-methods_new................
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
composite construction of structures.pdf
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Construction Project Organization Group 2.pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPT
Mechanical Engineering MATERIALS Selection
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Well-logging-methods_new................
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Foundation to blockchain - A guide to Blockchain Tech
Internet of Things (IOT) - A guide to understanding
additive manufacturing of ss316l using mig welding
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
composite construction of structures.pdf
UNIT 4 Total Quality Management .pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Construction Project Organization Group 2.pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Mechanical Engineering MATERIALS Selection
Automation-in-Manufacturing-Chapter-Introduction.pdf
Lecture Notes Electrical Wiring System Components
Model Code of Practice - Construction Work - 21102022 .pdf

Php technical presentation

  • 1. By dharmendra kumar dhakar Roll no:12115029 NIT RAIPUR
  • 2. Introduction Php is stands for php: hypertext pre-processor Widely used open source scripting language Server-side scripting language Embedded with html  current version of php is 5.5.15 released on 24 july 2014.
  • 3. What is scripting language  Scripting languages abstract their users from variable types and memory management  no need to compile  A scripting language is usually interpreted from source code to bytecode
  • 5. Server side scripting  it is a technique used in web design  involves embedding script in html source code  before respond to client , server execute server –side script and produce equivalent HTML code  server side scripting is different from client side scripting. For example javascript runs on brower.
  • 6. Importance of php in web development open source Cross platform architecture  Intergated with a wider range of database like oracle mysql ,ms access etc. It supports various servers like Apache ,IIS etc. Aache is best suited for executing PHP scripts
  • 7. PHP program structure <?php //php code goes here ?>  “.php” is default file extension for PHP  PHP file contains PHP scripting code and HTML tags
  • 8. Variables in PHP  Used for storing value  Can hold any type of value, no data type  Starts with $ sign and preceded by name of variable  name of variable are case sensitive
  • 9. Built in variable $_GET-used for retrieving form element ,also used for fetching value of variable through URL  $_POST:-HTTP post variable used for retrieving form element $_SESSION :-used for creating session variable $_COOKIE :-used for cookie manipulation
  • 10. Combining HTML and PHP <html> <head></head> <body> <?php echo “hello”; ?> </body> </html>
  • 11. PHP functions  function keyword is used to create a function  Syntax function fun_name(parameter){ //some code return some_value; }
  • 12. PHP ‘include’ and ‘requir’  used to include content of one file into another Syntax <?php include “header.php”; //some code include “footer.php” ?>
  • 13. PHP array  special variable that can hold multiple values at a time  Indexed array: array with numeric index  Associative array: element are accessed by keys instead of numeric index  multidimensional array: An array that can contain another array as value  array() function is used to create an array cont…
  • 14. PHP array  syntax $arr=array(1,2,3,4,5); //indexed array $arr=array(1=>2,4=>6,5=>7)//associative array $a=array(1=>array(1,2,3,4,5))//multidimentiona l
  • 15. PHP arrays  foreach loop:-special loop used for arrays  syntax to access array element foreach($arr as $value){ echo $value; //for indexed array }  to access element of associative array
  • 16. PHP array foreach($arr as $key=>$value) { echo “value at”.$key.”is”.$value; }  array_pop() function is used to delete the last element of an array
  • 17. MYSQL  Mysql is a database and defines structure for storing information.  MYSQL is used to perform database related operation.  Can be integrated with php.  open source database server.
  • 18. Connecting to mysql  In PHP connection is established using mysql_connect() function  syntax: mysql_connect(servername,username,database password); example:- <?php $ conn=mysql_connect(“localhost”,”root”,””) // some code ?>
  • 19. Closing MYSQL connection connection use the mysql_closeTo close the () function  example <php $db=mysql_connect(“localhost”,”root”,””); if(!$db) die(“cannot connet to mysal”); else //some code mysql_close($db); ?>
  • 20. session  contains information about same user between different web pages for a particular application  session_start() function is used to start session  $_SESSION variable is used to create session variable <?php session_start() $_SESSION[‘uname’]=“shyam”; ?>
  • 21. session  session_destroy() function is use to destroy session variable <?php session_start(); $_SESSION[‘uname’]=$_POST[‘name’]; // some code session_destroy() //destroy the session ?>
  • 22. cookie  often used to identify user  cookie is a small file which server embeds on user’s system  whenever same system request a webpage it sends cookie too  creating a cookie setcookie(‘name’,value’,expire,path,domain,security)
  • 23. cookie  $_COOKIE variable is used to retrieve cookie <?php setcookie(“name”, ”shyam” date()+12*60*60); echo $_COOKIE[‘name’]; ?>  session is better option of cookie