"PHP Hypertext Preprocessor" BYNIRMAL FELIX. K……………………………………………………………………
Introduction to PHPPHP standing for Personal Home Page/Form Interpreter
HTML embedded scripting language used to create dynamic Web pages.
IN 1994, the language was designed
The goal of the language is to allow Web developers to write dynamically generated pages quickly.PHP Functions
Working with PHPTo work PHP in our system we must download the following packages.The first step is to download the packages: • Apache : http://httpd.apache.org/• PHP : http://www.php.net/• MySQL :www.mysql.com
Introduction to LAMP and WAMPThese packages are called as LAMP (Linux, Apache, My SQL, PHP) for Linux operating system.
WAMP (Windows, Apache, My SQL, PHP ) for windows operating system.
Then install and configure these packagesGetting Started with PHPIf you choose PHP as your development language, what you need to get started depends on: • Sound knowledge of HTML.  • Working knowledge of JavaScript(optional)  • Sound Knowledge of SQL • Access to a web server that have Apache, My SQL and PHP configured and installed on your machine.
To check weather WAMP OR XAMPP is working enter http://localhost/xampp/ in your Web browser. The page will displayed as given below:
PHP Basics PHP Syntax:<? php écho 'Hello PHP'; ?>The nomenclature <? Php?> That makes the web server passes this portion of code to your PHP module
Note also the built-in PHP "echo" that enables printing to the screen
PHP can also be "mixed" in the HTML, which is convenient but not recommended PHP OperatorsThe most common PHP operators are assignment operators
 arithmetic operators
 combined operators
 comparison operators
 logical operators. PHP Variables A variable in PHP is always preceded by the dollar sign: $So to declare a variable we can write: $ myVar = 'value';Note that the semicolon at the end is required at the end of each statement
PHP String  A string variable is used to store and manipulatea piece of text.To declare a string we can write:<?php $text_str= “Hello World!”; echo “$text_str”	; ?>

php basics

  • 1.
    "PHP Hypertext Preprocessor"BYNIRMAL FELIX. K……………………………………………………………………
  • 2.
    Introduction to PHPPHPstanding for Personal Home Page/Form Interpreter
  • 3.
    HTML embedded scriptinglanguage used to create dynamic Web pages.
  • 4.
    IN 1994, thelanguage was designed
  • 5.
    The goal ofthe language is to allow Web developers to write dynamically generated pages quickly.PHP Functions
  • 6.
    Working with PHPTowork PHP in our system we must download the following packages.The first step is to download the packages: • Apache : http://httpd.apache.org/• PHP : http://www.php.net/• MySQL :www.mysql.com
  • 7.
    Introduction to LAMP and WAMPThese packages are called as LAMP (Linux, Apache, My SQL, PHP) for Linux operating system.
  • 8.
    WAMP (Windows, Apache,My SQL, PHP ) for windows operating system.
  • 9.
    Then install andconfigure these packagesGetting Started with PHPIf you choose PHP as your development language, what you need to get started depends on: • Sound knowledge of HTML.  • Working knowledge of JavaScript(optional)  • Sound Knowledge of SQL • Access to a web server that have Apache, My SQL and PHP configured and installed on your machine.
  • 10.
    To check weatherWAMP OR XAMPP is working enter http://localhost/xampp/ in your Web browser. The page will displayed as given below:
  • 11.
    PHP Basics PHP Syntax:<?php écho 'Hello PHP'; ?>The nomenclature <? Php?> That makes the web server passes this portion of code to your PHP module
  • 12.
    Note also thebuilt-in PHP "echo" that enables printing to the screen
  • 13.
    PHP can alsobe "mixed" in the HTML, which is convenient but not recommended PHP OperatorsThe most common PHP operators are assignment operators
  • 14.
  • 15.
  • 16.
  • 17.
    logical operators.PHP Variables A variable in PHP is always preceded by the dollar sign: $So to declare a variable we can write: $ myVar = 'value';Note that the semicolon at the end is required at the end of each statement
  • 18.
    PHP String  A string variable is used to store and manipulatea piece of text.To declare a string we can write:<?php $text_str= “Hello World!”; echo “$text_str” ; ?>
  • 19.
    PHP Arrays Byproviding the values as arguments to the array() function:  <?php $citylist = array("Noida", "Delhi", "Raipur", "Ambikapur", "Bhagalpur");?>
  • 20.
    PHP Flow controland looping If-else
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
    Foreach loopWorking withFile System & I/O Working with Files Opening a file :Syntax to open a file: $my_file=fopen(“file name”, “mode constant”); Closing a file :syntax to close a file: fclose(file_pointer);
  • 26.
    Working with DatabaseCreating a Connection using mysql:  In PHP, mysql_connect() function is used to connect to database .Syntax of mysql_connect: $con=mysql_connect(“localhost/ip”, “user_name”, “password”);  
  • 27.
    Various PHP functions : Error Handling
  • 28.
    Creating tables
  • 29.
    Handling File Upload
  • 30.
    Retrieving Database and Table list
  • 31.
    Used in email sessions Conclusion: Simplicity. For people new to programming, this is frequently the strongest appeal.Even those with little or no programming experience can quickly get up to speed and begin creating full-fledged applications.Because it was specifically designed for creating web applications.PHP has a host of built-in functions to handle common needs .THANK “U”