SlideShare a Scribd company logo
1 of 20
Introduction

 History
 Language syntax
 Advantages
An established server-side, cross-platform
embedded HTML scripting language for
creating dynamic Web pages.

PHP provides many features that
commercial entities are looking for.
Exceptionally short learning curve
•
• Quick development time
• Very high performance
• supports all major platforms
  (UNIX, Windows and even mainframes).
• Features native support for most popular
  databases
quot;PHP was built with the needs of Web
 developers in mind... Unlike other
 cumbersome, overhead-laden
 approaches, PHP is lightweight and
 focused on the Web - where it can solve
 complex problem scenarios quicker and
 more easily than comparable
 technologies.quot;
1994 - PHP was conceived sometimes in the Fall

    of 1994 by Rasmus Lerdorf
    1995 - PHP/FI Version 2. ( Introducing mySql

    data base)
    1997 – approximately 50,000 web sites.

    Introducing PHP Version 3.
    (Zeev Suraski and Andi Gutmans )
    2000 – PHP 4 was introduced, using “Zend”

    scripting engine. ( 5.1 million web sites. )
Treated just like regular HTML pages and

  you can create and edit them the same
  way you normally create regular HTML
  pages.
 As simple as HTML files with a whole new
  family of magical tags that let you do all
  sorts of things.
File name : Hello.php
<html><head><title>PHP
Test</title></head>
<body>
<?php echo quot;Hello World<p>quot;; ?>
</body></html>
Condition statements, loop statements,

    arrays ...
    Built in libraries. (sorting, list, queue..)

    Functions.

    Classes. ( Objects, Inheritance .. )

    String Manipulation. ( Perl )

    Built in support for encryption/Decryption

    functions.( MD5, DES, …)
Text files manipulation. ( Read, write, ..)

 Supports java objects, COM
  objects ...
 Sessions, cookies …
<?php echo $HTTP_USER_AGENT; ?>
•
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)


    <?php phpinfo(); ?>
•
    A list of all the global variables.
<?php
if(strstr($HTTP_USER_AGENT,quot;MSIEquot;
)) {?>
<center><b>You are using Internet
Explorer</b></center>
<?} else { ?>
<center><b>You are not using Internet
Explorer</b></center>
<?} ?>
One of the most powerful features of PHP

  is the way it handles HTML forms
 Any form element in a form will
  automatically result in a variable with the
  same name as the element being
  created on the target page.
HTML Page:
•
    <form action=quot;action.phpquot; method=quot;postquot;>
    Your name: <input type=quot;textquot; name=quot;namequot;>
    You age: <input type=quot;textquot; name=quot;agequot;>
    <input type=quot;submitquot;>
    </form>


    action.php.
•
    Hi <?php echo $name; ?>.
    You are <?php echo $age; ?> years old.
mySQL - PHP and MySQL work very well

  together, in addition to the speed and
  features of each individual tool.
 PHP is open-source, and offers excellent
  connectivity to most of today's common
  databases including
  Oracle, Sybase, MySQL, ODBC (and others).
 PHP also offers integration with various
  external libraries which enable the
  developer to do anything from generating
  PDF documents to parsing XML.
Connect to MySQL.

 Send a query.
 Print a table heading.
 Print table rows until end of the table has
  been reached.
<?php

$conn = mysql_connect(quot;localhostquot;, “ya
ronquot;, quot;quot;);
$res = mysql_query(quot;SELECT * FROM user
squot;, $conn);
$header_printed = false;
print quot;<TABLE>nquot;;
do {
    $data = mysql_fetch_array($res);

   // Retrieve the next row of data.

   if (!is_array($data)) {
       break;
   }
if (!$header_printed) {
        print quot; <TR>quot;;
        reset($data);
        while (list($name, $value) = each($data)) {
            print quot; <TH>$name</TH>nquot;
        }
        print quot; </TR>nquot;;
        $header_printed = true;
    }
    print quot; <TR>nquot;;
    print quot; <TD>quot;;

    print implode(quot;</TD>n   <TD>quot;, $data);
    print quot; </TR>nquot;;
} while ($data);
print quot;</TABLE>nquot;;

?>
Speed and robustness.

 Superior Memory Management
 No Hidden Costs with PHP
 Integration with MySQL database.
 Closer to Java/C++ Style of
  Programming.
 No Show Stopper Bugs.
 Cross Platform Migration Strategy.
PHP Homepage: http://www.php.net

 PHP-to-MySQL database tutorial:
  http://www.devshed.com/
  resource/advanced/php3/intro/index.ht
  ml
 Zend.com: http://www.Zend.com/

More Related Content

Viewers also liked

Viewers also liked (7)

MYSQL
MYSQLMYSQL
MYSQL
 
5-WebServers.ppt
5-WebServers.ppt5-WebServers.ppt
5-WebServers.ppt
 
Guide
GuideGuide
Guide
 
Data types in php
Data types in phpData types in php
Data types in php
 
Securing the Apache web server
Securing the Apache web serverSecuring the Apache web server
Securing the Apache web server
 
Apache web server
Apache web serverApache web server
Apache web server
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 

Similar to PHP Introduction

Similar to PHP Introduction (20)

Php intro
Php introPhp intro
Php intro
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
PHP Hypertext Preprocessor
PHP Hypertext PreprocessorPHP Hypertext Preprocessor
PHP Hypertext Preprocessor
 
Phpwebdevelping
PhpwebdevelpingPhpwebdevelping
Phpwebdevelping
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Phpwebdev
PhpwebdevPhpwebdev
Phpwebdev
 
PHP
PHPPHP
PHP
 
php (Hypertext Preprocessor)
php (Hypertext Preprocessor)php (Hypertext Preprocessor)
php (Hypertext Preprocessor)
 
HackU PHP and Node.js
HackU PHP and Node.jsHackU PHP and Node.js
HackU PHP and Node.js
 
PHP and MySQL
PHP and MySQLPHP and MySQL
PHP and MySQL
 

More from J.T.A.JONES

More from J.T.A.JONES (20)

Seismic
SeismicSeismic
Seismic
 
Fire Detection and Alarm Systems
Fire Detection and Alarm SystemsFire Detection and Alarm Systems
Fire Detection and Alarm Systems
 
Productivity
ProductivityProductivity
Productivity
 
Public Switched Telephone Network (PSTN)
Public Switched Telephone Network (PSTN)Public Switched Telephone Network (PSTN)
Public Switched Telephone Network (PSTN)
 
Video phone
Video phoneVideo phone
Video phone
 
navigation
navigationnavigation
navigation
 
Radar
RadarRadar
Radar
 
safety belts
safety beltssafety belts
safety belts
 
Safety
SafetySafety
Safety
 
Powder Metallurgy
Powder Metallurgy Powder Metallurgy
Powder Metallurgy
 
Die Casting
Die Casting Die Casting
Die Casting
 
Casting
CastingCasting
Casting
 
Fuel Systems
Fuel SystemsFuel Systems
Fuel Systems
 
Carburetor Theory
Carburetor TheoryCarburetor Theory
Carburetor Theory
 
Software Development Life Cycle Model
Software Development Life Cycle ModelSoftware Development Life Cycle Model
Software Development Life Cycle Model
 
Types of os
Types of osTypes of os
Types of os
 
IO Management
IO ManagementIO Management
IO Management
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Sorting & Linked Lists
Sorting & Linked ListsSorting & Linked Lists
Sorting & Linked Lists
 
Transformer
TransformerTransformer
Transformer
 

Recently uploaded

Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
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
 
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
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
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
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
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
 

Recently uploaded (20)

Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
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
 
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
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
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
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
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)
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
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
 

PHP Introduction

  • 1.
  • 3. An established server-side, cross-platform embedded HTML scripting language for creating dynamic Web pages. PHP provides many features that commercial entities are looking for.
  • 4. Exceptionally short learning curve • • Quick development time • Very high performance • supports all major platforms (UNIX, Windows and even mainframes). • Features native support for most popular databases
  • 5. quot;PHP was built with the needs of Web developers in mind... Unlike other cumbersome, overhead-laden approaches, PHP is lightweight and focused on the Web - where it can solve complex problem scenarios quicker and more easily than comparable technologies.quot;
  • 6. 1994 - PHP was conceived sometimes in the Fall  of 1994 by Rasmus Lerdorf 1995 - PHP/FI Version 2. ( Introducing mySql  data base) 1997 – approximately 50,000 web sites.  Introducing PHP Version 3. (Zeev Suraski and Andi Gutmans ) 2000 – PHP 4 was introduced, using “Zend”  scripting engine. ( 5.1 million web sites. )
  • 7. Treated just like regular HTML pages and  you can create and edit them the same way you normally create regular HTML pages.  As simple as HTML files with a whole new family of magical tags that let you do all sorts of things.
  • 8. File name : Hello.php <html><head><title>PHP Test</title></head> <body> <?php echo quot;Hello World<p>quot;; ?> </body></html>
  • 9. Condition statements, loop statements,  arrays ... Built in libraries. (sorting, list, queue..)  Functions.  Classes. ( Objects, Inheritance .. )  String Manipulation. ( Perl )  Built in support for encryption/Decryption  functions.( MD5, DES, …)
  • 10. Text files manipulation. ( Read, write, ..)   Supports java objects, COM objects ...  Sessions, cookies …
  • 11. <?php echo $HTTP_USER_AGENT; ?> • Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) <?php phpinfo(); ?> • A list of all the global variables.
  • 12. <?php if(strstr($HTTP_USER_AGENT,quot;MSIEquot; )) {?> <center><b>You are using Internet Explorer</b></center> <?} else { ?> <center><b>You are not using Internet Explorer</b></center> <?} ?>
  • 13. One of the most powerful features of PHP  is the way it handles HTML forms  Any form element in a form will automatically result in a variable with the same name as the element being created on the target page.
  • 14. HTML Page: • <form action=quot;action.phpquot; method=quot;postquot;> Your name: <input type=quot;textquot; name=quot;namequot;> You age: <input type=quot;textquot; name=quot;agequot;> <input type=quot;submitquot;> </form> action.php. • Hi <?php echo $name; ?>. You are <?php echo $age; ?> years old.
  • 15. mySQL - PHP and MySQL work very well  together, in addition to the speed and features of each individual tool.  PHP is open-source, and offers excellent connectivity to most of today's common databases including Oracle, Sybase, MySQL, ODBC (and others).  PHP also offers integration with various external libraries which enable the developer to do anything from generating PDF documents to parsing XML.
  • 16. Connect to MySQL.   Send a query.  Print a table heading.  Print table rows until end of the table has been reached.
  • 17. <?php $conn = mysql_connect(quot;localhostquot;, “ya ronquot;, quot;quot;); $res = mysql_query(quot;SELECT * FROM user squot;, $conn); $header_printed = false; print quot;<TABLE>nquot;; do { $data = mysql_fetch_array($res); // Retrieve the next row of data. if (!is_array($data)) { break; }
  • 18. if (!$header_printed) { print quot; <TR>quot;; reset($data); while (list($name, $value) = each($data)) { print quot; <TH>$name</TH>nquot; } print quot; </TR>nquot;; $header_printed = true; } print quot; <TR>nquot;; print quot; <TD>quot;; print implode(quot;</TD>n <TD>quot;, $data); print quot; </TR>nquot;; } while ($data); print quot;</TABLE>nquot;; ?>
  • 19. Speed and robustness.   Superior Memory Management  No Hidden Costs with PHP  Integration with MySQL database.  Closer to Java/C++ Style of Programming.  No Show Stopper Bugs.  Cross Platform Migration Strategy.
  • 20. PHP Homepage: http://www.php.net   PHP-to-MySQL database tutorial: http://www.devshed.com/ resource/advanced/php3/intro/index.ht ml  Zend.com: http://www.Zend.com/