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

Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 

Último (20)

Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 

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