SlideShare una empresa de Scribd logo
1 de 36
Prepared by: 
Chandan Das 
B.Tech 5th Semester 
Dept of CSE 
CIT , KOKRAJHAR
INTRODUCTION 
• It is an interpreted, server-side scripting language. 
• Originally designed for web development. 
• Similar languages are Perl, ASP.NET, Ruby, JSP (Java 
Server Pages) 
• Embedded into HTML 
• Can use DB (MySQL, Oracle, Microsoft SQL, Postgre 
SQL)
PHP stands for?? 
Personal Home Page
HISTORY 
• Began in 1994 by Rasmus Lerdorf 
• Soon he named PHP/FI to build simple, dynamic web 
applications. 
• In 1995 -the release of PHP/FI as "Personal Home Page 
Tools (PHP Tools) version 1.0". 
• In 1997 Zeev Suraski and Andi Gutmans rewrote 
the parser and formed the base of PHP 3, changing the 
name PHP: Hypertext Preprocessor. 
• On May,2000, PHP 4 was released, 
• On July , 2004, PHP 5 was released, powered by the new 
Zend Engine II. 
• In 2008 PHP 5 became the only stable version under 
development. 
• Finally after a vote the current version released in 2014 .
SCRIPTING LANGUAGE
SCRIPTING LANGUAGE 
• A scripting language is: 
– cross-platform since interpreter is easy to port 
– implicit variable declaration 
– compiled on demand 
– Extending 
– Glue programming
HOW PHP WORKS??
BASIC PHP SYNTAX 
<?php 
?>
VARIABLES IN PHP 
• All variables in PHP start with a $ sign symbol. 
• Variables may contain strings, numbers, or arrays. 
<html> 
<body> 
<?php $txt="Hello World"; echo $txt; 
?> 
</body> 
</html>
DATA TYPES 
• String 
$name=“x” 
– 'My name is x.' 
– "My name is $name." 
• Boolean 
• Integer 
• Floating point 
• Array 
– $a=array("tokyo", "hanoi", "london") 
– $a=array("japan" => "tokyo", "vietnam" => 
"hanoi", "england" => "london") 
– $a[2] 
– $a["vietnam"]
STRING HANDLING 
• String literals (constants) enclosed in double quotes “ ” 
or single quotes ‘ ’ 
• Within “”, variables are replaced by their value: – called 
variable interpolation. “My name is $name, I think” 
• Strings are concatenated (joined end to end) with the 
dot operator “key”.”board” == “keyboard”
THE IF...ELSE STATEMENT 
Syntax 
if (condition) 
code to be executed if condition is true; 
else 
code to be executed if condition is false;
Syntax 
switch (expression) 
{ 
case label1: code to be executed if expression = 
label1; break; 
case label2: code to be executed if expression = 
label2; break; 
default: code to be executed if expression 
is different from both label1 
and label2; 
} 
THE SWITCH STATEMENT
PHP FUNCTION 
• Strlen(); 
• Strcmp(); 
• Date(); 
• Time(); 
• Include(); 
• Require();
STATE MANAGEMENT 
• It is used to help web 
applications to maintain 
their state across several 
HTTP requests when 
needed. 
• Cookies 
• Session
SESSION 
• Better option of cookie 
• Store information about a user. They 
are available only for a particular 
application and hold information of 
only one single user.
Syntax: 
<?php start_session(); ?>
<?php start_session(); 
$_SESSION[‘user_name’]=‘’ 
$_SESSION[‘pwd’]=‘’ 
?> //create a session
select username,password 
From table 
Where username=‘textbox1’ and 
password=‘textbox2’
<?php start_session(); 
$_SESSION[‘user_name’]= 
$_SESSION[‘pwd’]= 
if(isset($_SESSION[‘username’])) 
Echo “Welcome”. $_SESSION[‘name’] 
?> //retrieve a session
• session_destroy(); 
• unset(); 
<?php start_session(); 
$_SESSION[‘user_name’]= 
if(isset($_POST[“lgt_btn"])) 
unset($_SESSION[‘user_name’]); 
?> Name of the 
Logout button
FEATURES OF PHP 
– Support for MySQL, Oracle, dbm, DB2, 
PostgreSQL 
– Can connect to any database which 
provides an ODBC driver (Open Database 
Connectivity Standard) – e.g. MS Access. 
– Supported on Windows, Mac OS X, other 
Unix-like systems (e.g. Linux). 
– Similar syntax and features as C++ and Java. 
– PHP designer,Wampp/Xampp are free of 
cost.
REFERENCES 
• Wikipedia 
• Google images 
• www.w3schools.com
THANK YOU

Más contenido relacionado

La actualidad más candente

Php Server Var
Php Server VarPhp Server Var
Php Server Vararvind34
 
Introduction To Power Shell
Introduction To Power ShellIntroduction To Power Shell
Introduction To Power ShellIvan Suhinin
 
PowerShell 101
PowerShell 101PowerShell 101
PowerShell 101Thomas Lee
 
Nette framework (WebElement #28)
Nette framework (WebElement #28)Nette framework (WebElement #28)
Nette framework (WebElement #28)Adam Štipák
 
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpdayJeroen van der Gulik
 
Getting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot FrameworkGetting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot FrameworkSarah Sexton
 
An Introduction to Symfony
An Introduction to SymfonyAn Introduction to Symfony
An Introduction to Symfonyxopn
 
Word Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with TraceryWord Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with TracerySarah Sexton
 
Web application, cookies and sessions
Web application, cookies and sessionsWeb application, cookies and sessions
Web application, cookies and sessionshamsa nandhini
 
Philip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik at TechTalks.ph - Intro to Groovy and GrailsPhilip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik at TechTalks.ph - Intro to Groovy and GrailsPhilip Stehlik
 
Efficient DBA: Gain Time by Reducing Command-Line Keystrokes
Efficient DBA: Gain Time by Reducing Command-Line KeystrokesEfficient DBA: Gain Time by Reducing Command-Line Keystrokes
Efficient DBA: Gain Time by Reducing Command-Line KeystrokesSeth Miller
 
Development of Ansible modules
Development of Ansible modulesDevelopment of Ansible modules
Development of Ansible modulesjtyr
 

La actualidad más candente (19)

Php Server Var
Php Server VarPhp Server Var
Php Server Var
 
Introduction To Power Shell
Introduction To Power ShellIntroduction To Power Shell
Introduction To Power Shell
 
Php workshop L04 database
Php workshop L04 databasePhp workshop L04 database
Php workshop L04 database
 
PHP
PHPPHP
PHP
 
PowerShell 101
PowerShell 101PowerShell 101
PowerShell 101
 
Sa
SaSa
Sa
 
Nette framework (WebElement #28)
Nette framework (WebElement #28)Nette framework (WebElement #28)
Nette framework (WebElement #28)
 
SHELL PROGRAMMING
SHELL PROGRAMMINGSHELL PROGRAMMING
SHELL PROGRAMMING
 
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
 
Php Training Workshop by Vtips
Php Training Workshop by VtipsPhp Training Workshop by Vtips
Php Training Workshop by Vtips
 
17 sessions
17 sessions17 sessions
17 sessions
 
Getting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot FrameworkGetting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot Framework
 
An Introduction to Symfony
An Introduction to SymfonyAn Introduction to Symfony
An Introduction to Symfony
 
Word Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with TraceryWord Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with Tracery
 
Web application, cookies and sessions
Web application, cookies and sessionsWeb application, cookies and sessions
Web application, cookies and sessions
 
Philip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik at TechTalks.ph - Intro to Groovy and GrailsPhilip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik at TechTalks.ph - Intro to Groovy and Grails
 
Unix shell scripting tutorial
Unix shell scripting tutorialUnix shell scripting tutorial
Unix shell scripting tutorial
 
Efficient DBA: Gain Time by Reducing Command-Line Keystrokes
Efficient DBA: Gain Time by Reducing Command-Line KeystrokesEfficient DBA: Gain Time by Reducing Command-Line Keystrokes
Efficient DBA: Gain Time by Reducing Command-Line Keystrokes
 
Development of Ansible modules
Development of Ansible modulesDevelopment of Ansible modules
Development of Ansible modules
 

Destacado

STaR powerpoint
STaR powerpointSTaR powerpoint
STaR powerpointachadney
 
REST based web applications with Spring 3
REST based web applications with Spring 3REST based web applications with Spring 3
REST based web applications with Spring 3Oliver Gierke
 
Coordinating the Many Tools of Big Data - Apache HCatalog, Apache Pig and Apa...
Coordinating the Many Tools of Big Data - Apache HCatalog, Apache Pig and Apa...Coordinating the Many Tools of Big Data - Apache HCatalog, Apache Pig and Apa...
Coordinating the Many Tools of Big Data - Apache HCatalog, Apache Pig and Apa...Big Data Spain
 
Covering Oil: Big Data, Big Tools, and Journalism - Presentation by Anya Schi...
Covering Oil: Big Data, Big Tools, and Journalism - Presentation by Anya Schi...Covering Oil: Big Data, Big Tools, and Journalism - Presentation by Anya Schi...
Covering Oil: Big Data, Big Tools, and Journalism - Presentation by Anya Schi...gijn
 
PhD presentation bboulay
PhD presentation bboulayPhD presentation bboulay
PhD presentation bboulayBernard Boulay
 
Managing your Assets with Big Data Tools
Managing your Assets with Big Data ToolsManaging your Assets with Big Data Tools
Managing your Assets with Big Data ToolsMachinePulse
 
Essential Tools For Your Big Data Arsenal
Essential Tools For Your Big Data ArsenalEssential Tools For Your Big Data Arsenal
Essential Tools For Your Big Data ArsenalMongoDB
 
Data Mining and Machine Learning
Data Mining and Machine LearningData Mining and Machine Learning
Data Mining and Machine LearningJakub Ruzicka
 

Destacado (10)

STaR powerpoint
STaR powerpointSTaR powerpoint
STaR powerpoint
 
REST based web applications with Spring 3
REST based web applications with Spring 3REST based web applications with Spring 3
REST based web applications with Spring 3
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
SQL overview and software
SQL overview and softwareSQL overview and software
SQL overview and software
 
Coordinating the Many Tools of Big Data - Apache HCatalog, Apache Pig and Apa...
Coordinating the Many Tools of Big Data - Apache HCatalog, Apache Pig and Apa...Coordinating the Many Tools of Big Data - Apache HCatalog, Apache Pig and Apa...
Coordinating the Many Tools of Big Data - Apache HCatalog, Apache Pig and Apa...
 
Covering Oil: Big Data, Big Tools, and Journalism - Presentation by Anya Schi...
Covering Oil: Big Data, Big Tools, and Journalism - Presentation by Anya Schi...Covering Oil: Big Data, Big Tools, and Journalism - Presentation by Anya Schi...
Covering Oil: Big Data, Big Tools, and Journalism - Presentation by Anya Schi...
 
PhD presentation bboulay
PhD presentation bboulayPhD presentation bboulay
PhD presentation bboulay
 
Managing your Assets with Big Data Tools
Managing your Assets with Big Data ToolsManaging your Assets with Big Data Tools
Managing your Assets with Big Data Tools
 
Essential Tools For Your Big Data Arsenal
Essential Tools For Your Big Data ArsenalEssential Tools For Your Big Data Arsenal
Essential Tools For Your Big Data Arsenal
 
Data Mining and Machine Learning
Data Mining and Machine LearningData Mining and Machine Learning
Data Mining and Machine Learning
 

Similar a php (Hypertext Preprocessor)

Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Muhamad Al Imran
 
Php Crash Course - Macq Electronique 2010
Php Crash Course - Macq Electronique 2010Php Crash Course - Macq Electronique 2010
Php Crash Course - Macq Electronique 2010Michelangelo van Dam
 
HackU PHP and Node.js
HackU PHP and Node.jsHackU PHP and Node.js
HackU PHP and Node.jssouridatta
 
PHP from soup to nuts Course Deck
PHP from soup to nuts Course DeckPHP from soup to nuts Course Deck
PHP from soup to nuts Course DeckrICh morrow
 
PHP language presentation
PHP language presentationPHP language presentation
PHP language presentationAnnujj Agrawaal
 
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...anshkhurana01
 
Website designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentWebsite designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentCss Founder
 
phpwebdev.ppt
phpwebdev.pptphpwebdev.ppt
phpwebdev.pptrawaccess
 

Similar a php (Hypertext Preprocessor) (20)

Basics PHP
Basics PHPBasics PHP
Basics PHP
 
Materi Dasar PHP
Materi Dasar PHPMateri Dasar PHP
Materi Dasar PHP
 
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
 
Php with mysql ppt
Php with mysql pptPhp with mysql ppt
Php with mysql ppt
 
Php Crash Course - Macq Electronique 2010
Php Crash Course - Macq Electronique 2010Php Crash Course - Macq Electronique 2010
Php Crash Course - Macq Electronique 2010
 
Starting Out With PHP
Starting Out With PHPStarting Out With PHP
Starting Out With PHP
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
HackU PHP and Node.js
HackU PHP and Node.jsHackU PHP and Node.js
HackU PHP and Node.js
 
Prersentation
PrersentationPrersentation
Prersentation
 
PHP from soup to nuts Course Deck
PHP from soup to nuts Course DeckPHP from soup to nuts Course Deck
PHP from soup to nuts Course Deck
 
INTRODUCTION to php.pptx
INTRODUCTION to php.pptxINTRODUCTION to php.pptx
INTRODUCTION to php.pptx
 
PHP language presentation
PHP language presentationPHP language presentation
PHP language presentation
 
Phphacku iitd
Phphacku iitdPhphacku iitd
Phphacku iitd
 
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
 
Website designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentWebsite designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopment
 
Php1
Php1Php1
Php1
 
phpwebdev.ppt
phpwebdev.pptphpwebdev.ppt
phpwebdev.ppt
 

Último

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Último (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

php (Hypertext Preprocessor)

  • 1. Prepared by: Chandan Das B.Tech 5th Semester Dept of CSE CIT , KOKRAJHAR
  • 2. INTRODUCTION • It is an interpreted, server-side scripting language. • Originally designed for web development. • Similar languages are Perl, ASP.NET, Ruby, JSP (Java Server Pages) • Embedded into HTML • Can use DB (MySQL, Oracle, Microsoft SQL, Postgre SQL)
  • 3. PHP stands for?? Personal Home Page
  • 4.
  • 5. HISTORY • Began in 1994 by Rasmus Lerdorf • Soon he named PHP/FI to build simple, dynamic web applications. • In 1995 -the release of PHP/FI as "Personal Home Page Tools (PHP Tools) version 1.0". • In 1997 Zeev Suraski and Andi Gutmans rewrote the parser and formed the base of PHP 3, changing the name PHP: Hypertext Preprocessor. • On May,2000, PHP 4 was released, • On July , 2004, PHP 5 was released, powered by the new Zend Engine II. • In 2008 PHP 5 became the only stable version under development. • Finally after a vote the current version released in 2014 .
  • 7. SCRIPTING LANGUAGE • A scripting language is: – cross-platform since interpreter is easy to port – implicit variable declaration – compiled on demand – Extending – Glue programming
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. BASIC PHP SYNTAX <?php ?>
  • 18. VARIABLES IN PHP • All variables in PHP start with a $ sign symbol. • Variables may contain strings, numbers, or arrays. <html> <body> <?php $txt="Hello World"; echo $txt; ?> </body> </html>
  • 19. DATA TYPES • String $name=“x” – 'My name is x.' – "My name is $name." • Boolean • Integer • Floating point • Array – $a=array("tokyo", "hanoi", "london") – $a=array("japan" => "tokyo", "vietnam" => "hanoi", "england" => "london") – $a[2] – $a["vietnam"]
  • 20. STRING HANDLING • String literals (constants) enclosed in double quotes “ ” or single quotes ‘ ’ • Within “”, variables are replaced by their value: – called variable interpolation. “My name is $name, I think” • Strings are concatenated (joined end to end) with the dot operator “key”.”board” == “keyboard”
  • 21. THE IF...ELSE STATEMENT Syntax if (condition) code to be executed if condition is true; else code to be executed if condition is false;
  • 22. Syntax switch (expression) { case label1: code to be executed if expression = label1; break; case label2: code to be executed if expression = label2; break; default: code to be executed if expression is different from both label1 and label2; } THE SWITCH STATEMENT
  • 23. PHP FUNCTION • Strlen(); • Strcmp(); • Date(); • Time(); • Include(); • Require();
  • 24. STATE MANAGEMENT • It is used to help web applications to maintain their state across several HTTP requests when needed. • Cookies • Session
  • 25. SESSION • Better option of cookie • Store information about a user. They are available only for a particular application and hold information of only one single user.
  • 27. <?php start_session(); $_SESSION[‘user_name’]=‘’ $_SESSION[‘pwd’]=‘’ ?> //create a session
  • 28.
  • 29. select username,password From table Where username=‘textbox1’ and password=‘textbox2’
  • 30.
  • 31. <?php start_session(); $_SESSION[‘user_name’]= $_SESSION[‘pwd’]= if(isset($_SESSION[‘username’])) Echo “Welcome”. $_SESSION[‘name’] ?> //retrieve a session
  • 32. • session_destroy(); • unset(); <?php start_session(); $_SESSION[‘user_name’]= if(isset($_POST[“lgt_btn"])) unset($_SESSION[‘user_name’]); ?> Name of the Logout button
  • 33.
  • 34. FEATURES OF PHP – Support for MySQL, Oracle, dbm, DB2, PostgreSQL – Can connect to any database which provides an ODBC driver (Open Database Connectivity Standard) – e.g. MS Access. – Supported on Windows, Mac OS X, other Unix-like systems (e.g. Linux). – Similar syntax and features as C++ and Java. – PHP designer,Wampp/Xampp are free of cost.
  • 35. REFERENCES • Wikipedia • Google images • www.w3schools.com