my self learing -php

Download My self learing -Php

If you can't read please download the document

Upload: laavanyad2009

Post on 23-Jun-2015

422 views

Category:

Documents


4 download

TRANSCRIPT

  • 1. My self Learn -PHP
    • What is PHP?
  • 2. Characteristics of PHP?

3. Requierments to run PHP? 4. Syntax of PHP? 5. PHP Loop Types 6. Arrays and Strings 7. PHP File Inclusion 8. GET and Post Methods 9. Cookies 10. Sessions 11. File upload 12. PHP Date & time method. 13. What is PHP?

  • PHP stands for Hypertext Preprocessor.

14. It is server side scripting Language. 15. It is used for web designing 16. It is integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server. 17. CharacteristicsSimplicity EfficiencySecurity Flexibility Familiarity 18. Requierments to run PHP 1. It is serverside scripting language so probabblyWe needfollwing severs. Apache PHP XAMMPMySqlSoftwarePerl So if weinstall Xampp everything will be installed . 2.Any Editor to write coding like notepad. 3.Browser to to view the output of program. 19. SYNTAX Example: 20. LOOP TYPES 1. if else 2. forloop 3.for each 4. while loop5.do while loop 6.break 7.continue Syntax and codings similar to C language. 21. Arrays and Strings Array is data structuer that stores one or moreSimilar types of variables in single name. *Numeric array - An array with a numericindex * Associative array - An array where each IDkey is associated with a value * Multidimensional array - An array containingone or more arrays 22. Strings String issequences of character EX:$string_1 = "This is a string in doublequotes"; There are more number of function.For functions refer: http://www.w3schools.com/php/php_ref_string.asp 23. FILE INCLSION 1. include():The include() function takes all thetext in a specified file and copiesit into the file that uses the include function Ex: menu.php file contains X.Php include th menu.php file using following coding OUTPUT OF X.php: home->user1->user2 24. FILE INCLUSION requier()-The require() function takes all the text ina specified file and copies it into the file that uses the include function EX : if we want to use x.php file which already include the menu.php file 25. GET &POST METHODS GET:Itsends the encoded user informationappended to the page request. The page and the encoded information are separated by the ? Character . Ex:output contains the submitted page information. Name: Age: OUTPUT:http://www.w3schools.com/welcome.php? fname=Peter&age=37 26. POST METHOD Using the GET method is restricted to send upto 1024 characters only but if we want to send more then 1024 char we will go forthe POST method does not have any restriction on data size to be sent. Ex: Name: Age: OUTPUT:The url does not store vaue but the page retrive the value http://www.w3schools.com/welcome.php