Introduction

 History
 Language syntax
 Advantages
An established server-side, cross-platform
embedded HTML scripting language for
creating dynamic Web pages.

PHP provides ...
Exceptionally short learning curve
•
• Quick development time
• Very high performance
• supports all major platforms
  (UN...
quot;PHP was built with the needs of Web
 developers in mind... Unlike other
 cumbersome, overhead-laden
 approaches, PHP ...
1994 - PHP was conceived sometimes in the Fall

    of 1994 by Rasmus Lerdorf
    1995 - PHP/FI Version 2. ( Introducing ...
Treated just like regular HTML pages and

  you can create and edit them the same
  way you normally create regular HTML
...
File name : Hello.php
<html><head><title>PHP
Test</title></head>
<body>
<?php echo quot;Hello World<p>quot;; ?>
</body></h...
Condition statements, loop statements,

    arrays ...
    Built in libraries. (sorting, list, queue..)

    Functions.
...
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 li...
<?php
if(strstr($HTTP_USER_AGENT,quot;MSIEquot;
)) {?>
<center><b>You are using Internet
Explorer</b></center>
<?} else { ...
One of the most powerful features of PHP

  is the way it handles HTML forms
 Any form element in a form will
  automati...
HTML Page:
•
    <form action=quot;action.phpquot; method=quot;postquot;>
    Your name: <input type=quot;textquot; name=q...
mySQL - PHP and MySQL work very well

  together, in addition to the speed and
  features of each individual tool.
 PHP ...
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
sq...
if (!$header_printed) {
        print quot; <TR>quot;;
        reset($data);
        while (list($name, $value) = each($da...
Speed and robustness.

 Superior Memory Management
 No Hidden Costs with PHP
 Integration with MySQL database.
 Close...
PHP Homepage: http://www.php.net

 PHP-to-MySQL database tutorial:
  http://www.devshed.com/
  resource/advanced/php3/in...
php
Upcoming SlideShare
Loading in...5
×

php

1,399

Published on

presentation

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,399
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

php

  1. 1. Introduction   History  Language syntax  Advantages
  2. 2. 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.
  3. 3. 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
  4. 4. 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;
  5. 5. 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. )
  6. 6. 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.
  7. 7. File name : Hello.php <html><head><title>PHP Test</title></head> <body> <?php echo quot;Hello World<p>quot;; ?> </body></html>
  8. 8. 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, …)
  9. 9. Text files manipulation. ( Read, write, ..)   Supports java objects, COM objects ...  Sessions, cookies …
  10. 10. <?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.
  11. 11. <?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> <?} ?>
  12. 12. 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.
  13. 13. 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.
  14. 14. 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.
  15. 15. Connect to MySQL.   Send a query.  Print a table heading.  Print table rows until end of the table has been reached.
  16. 16. <?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; }
  17. 17. 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;; ?>
  18. 18. 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.
  19. 19. 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/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×