PHP presentation - Com 585

2,221 views

Published on

Overview of PHP

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,221
On SlideShare
0
From Embeds
0
Number of Embeds
242
Actions
Shares
0
Downloads
27
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • PHP-FI included ability to integrate forms with databases. PHP 4 included better resource-handling which made it scalable for large scale applications. Also included support for object-oriented programming. PHP 5 improved on support for OOP and added many more features.
  • PHP presentation - Com 585

    1. 1. .
    2. 2. • Server Based scripting language• Embedded into HTML• Manages Forms• Interfaces with databases (MySQL, etc)• Creating dynamic pages on the fly
    3. 3. 1994 - Personal Home Page Tools 1995 - PHP-FI (Form Interpreter) Forms and databases 1997 - PHP 3 (50,000 users) (Hypertext Preprocessor) 1999 – 1,000,000 users 2000 – PHP 4 (OOP & scalable) 3.6 million users Today – PHP5 - Over 20 millionRasmus Lerdorf
    4. 4. • It’s Free - no licensing restrictions• Crowd sourced – constantly improving (Given enough eyeballs, all bugs are shallow)• Minimalist language – simpler• Easy to learn (especially if know C/C+)• Over 120 libraries and 1,000 functions• Powerful string-parsing capabilities• Embraces object oriented programming• Integrates with over 25 types of databases
    5. 5. 1) Server receives request via HTTP & retrieves file2) If .php file, then processed by the PHP engine3) Script’s application executes, performs database queries4) PHP engine constructs HTML page with results– sends to browser
    6. 6.  <html> <head> <title>My first PHP Page</title> </head> <body> This is normal HTML code <?php //php code goes here ?> Back into normal HTML </body> </html>
    7. 7. Establish a connection with the database mysql_connect ( [$server [,$username [, $password]]])Validate user input as needed (verify user ID, etc.)Select the database on the server to use mysql_select_db ($database [, $link]);Execute the desired query against the database mysql_query($query [, $link]);Retrieve and process the results mysql_fetch_row ($result); (this function would return a single row from the result set)Create HTML or perform actions based upon the resultsClose the database connection (optional)
    8. 8. Scripts are a series of PHP Statements, each of which performs an action Save your PHP script with the .php extension
    9. 9.  .

    ×