PHP OVERVIEW. C ONTENT Introduction of PHP History and development Basics of PHP programming.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Software Freedom Day th September 2007 Asia Pacific Institute of Information Technology Colombo, Sri Lanka. Nazly Ahmed Scripting The Web.
PHP: Hypertext Preprocessor Greg Lowe Rob White Brian Wright Mike Zywiec.
BY: ALBERTO CABEZAS 4/19/2010. INTRODUCTION: PHP is considered today as one of the most famous scripting languages. PHP is widely used as a general purpose.
Introduction to PHP (Part-1) Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
PHP Server-side Programming. PHP  PHP stands for PHP: Hypertext Preprocessor  PHP is interpreted  PHP code is embedded into HTML code  interpreter.
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
PHP By Dr. Syed Noman Hasany. PHP PHP was originally created by Rasmus Lerdorf in PHP stands for PHP: Hypertext Preprocessor (a recursive acronym).
PHP PHP: Hypertext Preprocessing. What is PHP? PHP is a server-side scripting language designed specifically for the Web. An open source language PHP.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
Introduction to PHP. PHP PHP is the Hypertext Pre-processor –Script language –Embedded into HTML –Runs as Apache module –Can use DB (MySQL, Oracle, Microsoft.
August Chapter 1 - Essential PHP spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science and Technology.
ALBERT WAVERING BOBBY SENG. Week Whatever: PHP  Announcements/questions/complaints.
UFCEKG-20-2 Data, Schemas & Applications Lecture 4 Server Side Scripting & PHP.
PHP HYPERTEXT: PREPROCESSOR By: Justin T. Pleva. WHAT IS PHP?  General purpose  Server-side web development  Console application.
PHP - Hypertext Preprocessor Yaron Benita De Paul University.
ITD 3194 Web Application Development Chapter 4: Web Programming Language.
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
Languages in WEB Presented by: Jenisha Kshatriya BCM SS09.
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
INTERNET APPLICATION DEVELOPMENT For More visit:
PHP PHP: Hypertext Preprocessing Preston Brinks and Sean McKenzie.
PHP TUTORIAL. HISTORY OF PHP  PHP as it's known today is actually the successor to a product named PHP/FI.  Created in 1994 by Rasmus Lerdorf, the very.
Nael Alian Introduction to PHP
IST 210: PHP BASICS IST 210: Organization of Data IST210 1.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Technical Review - PHP Jang Jaeseok. Overview Introduction  What is PHP?  History of PHP  What can do with PHP?  Advantages of PHP PHP syntax.
November 2003Bent Thomsen - FIT 6-11 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
Introduction to PHP and MySQL Kirkwood Center for Continuing Education By Fred McClurg, © Copyright 2015, Fred McClurg, All Rights.
PHP By Sergio Rodriguez By Sergio Rodriguez. PHP G PHP: Hypertext Preprocessor G Scripting language G PHP: Hypertext Preprocessor G Scripting language.
Open Source Software Unit – 3 Presented By Mr. R.Aravindhan.
Overview: 1. Discussion of the basic architecture of a web application. 2. Discussion of the relevance of using MySQL and PHP in a web application.
Introduction to CS520/CS596_026 Lecture Two Gordon Tian Fall 2015.
PHP. What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
Introduction to PHP Advanced Database System Lab no.1.
What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports.
WEB DEVELOPMENT WITH PHP/MYSQL. WEB DEVELOPMENT COURSE HAS DIFFERENT NAME IN DIFFERENT INSITUTES, THIS IS A CORE COURSE FOR BS/MS STUDENTS. THIS IS ALSO.
CSE 154 LECTURE 5: INTRO TO PHP. URLs and web servers usually when you type a URL in your browser: your computer looks up the.
Introduction to PHP.
©John Samuel 2008 Introduction to PHP. ©John Samuel 2008 Objectives At the end of this class the student will be able to; Create and run a simple php.
IT ELECTIVE 2.  Web server Can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver content that.
CHAPTER 6 Introduction to PHP5 Part I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
PHP OVERVIEW. C ONTENT Introduction of PHP History and development Basics of PHP programming.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
©John Samuel 2008 Introduction to PHP Note: These slides are not included in coverage for the BIF703 final exam...
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
By bscshelp.com 1.  It is a group assignment.  Complete Website design Using Html and Css.  Due date: 10 th December, 2014 (Hard Deadline) 2.
1 Server Side scripting PHP. 2 What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are.
Introduction to PHP. PHP Origins Rasmus LerdorfRasmus Lerdorf (born Greenland, ed Canada) PHP originally abbreviation for ‘Personal Home Pages’, now ‘PHP.
A pache M ySQL P hp Robert Mudge Reference:
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
PHP using MySQL Database for Web Development (part II)
Introduction to PHP “PHP is a server-side scripting language designed specifically for the Web. Within an HTML page, you can embed PHP code that will be.
PHP (PHP: Hypertext Preprocessor)
Introduction to PHP “PHP is a server-side scripting language designed specifically for the Web. Within an HTML page, you can embed PHP code that will be.
PHP PHP PHP STAND FOR HYPERTEXT PRE-PROCESSOR. PHP PHP PHP STAND FOR HYPERTEXT PRE-PROCESSOR.
PHP Introduction.
PHP.
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
Intro to PHP.
Tutorial 6 PHP & MySQL Li Xu
PHP an introduction.
SEEM 4540 Tutorial 4 Basic PHP based on w3Schools
Presentation transcript:

PHP OVERVIEW

C ONTENT Introduction of PHP History and development Basics of PHP programming

W HAT IS PHP ? PHP = Hypertext preprocessor Server side scripting language Used for development of dynamical webpages Part of typical LAMP combination Linux, Apache, MySQL and PHP Includes a command line scripting possibility Can be used in graphical applications

H OW IT WORKS PHP code is usually embedded into HTML Processing the code : 1) The HTML code stands as it is 2) The PHP scripts are executed to create final HTML code 3) Both parts are combined and back 4) Resulting HTML is interpreted by a browser

A DVANTAGES OF PHP Freely available The PHP group provides complete source code free of charge Similar syntax to C, Pearl Works with many operating systems Can be deployed on many web servers Interacts with lots of databases It is supported by many providers of webhosting

H ISTORY – INITIAL DEVELOPMENT Originally created by Rasmus Lerdorf PHP originally stood for Personal Home Page Replaces small set of Pearl scripts Used as a tool for observing traffic on webpage PHP 2 (PHP/FI) First publicly released version (on June 8, 1995) Combination of Lerdorf’s Form Interpreter and original binary from PHP Was able to communicate with databases Enabled the building of dynamical web application included Perl-like variables, form handling, and the ability to be embedded HTML

H ISTORY – R ELEASED VERSIONS PHP (PHP: Hypertext Preprocessor) was created by Rasmus Lerdorf in It was initially developed for HTTP usage logging and server-side form generation in Unix. PHP 2 (1995) transformed the language into a Server-side embedded scripting language. Added database support, file uploads, variables, arrays, recursive functions, conditionals, iteration, regular expressions, etc. PHP 3 (1998) added support for ODBC data sources, multiple platform support, protocols (SNMP,IMAP), and new parser written by Zeev Suraski and Andi Gutmans. PHP 4 (2000) became an independent component of the web server for added efficiency. The parser was renamed the Zend Engine. Many security features were added. PHP 5 (2004) adds Zend Engine II with object oriented programming, robust XML support using the libxml2 library, SOAP extension for interoperability with Web Services, SQLite has been bundled with PHP

C URRENT VERSION - PHP 5 The most recent extension (the 5.2.6) was published on May 1, 2008 Uses enhanced Zend II engine It includes : support for object-oriented programming, the PHP Data Objects extension (simplifies accessing databases) numerous performance enhancements

WEBSITES USING PHP More than 20 million Internet domains are hosted on servers with PHP installed Significant examles User-facing portion of Facebook Wikipedia (MediaWiki) Yahoo! MyYearbook

W HAT DO Y OU N EED TO WORK WITH PHP? If your server supports PHP You don’t need anything Just create some.php files in your web directory If your server does not support PHP, you must install PHP. Download PHP Download database (MySQL) Download server (Apache)

B ASICS OF SYNTAX Scripting block starts with Each code line in PHP must end with a ( ; ) Comments //,# comment /* comment */ Writing of the plain text Echo “ text ” print “ text ”

V ARIABLES IN PHP Each variable starts with $ symbol Variable name can contain only a-Z,0-9,_ It does not need to be declared before its setting. <?php $ txt = " Hello World !" ; $ number = 16 ; ?>

V ARIABLE TYPES Numerical Integer – positive as well as negative, including 0 Float – real numbers, 14 digits accuracy Logical Boolean - True x False, not case sensitive Alphabetical String – set of characters

W ORKING WITH VARIABLES Settype($ var, “ integer ”) allows you to set variable according to your wish Gettype() write the type of variable (. ) Connects 2 variables of string type strlen() finds the length of a string

PHP O PERATORS

L OGICAL OPERATORS && = and || = or At least one of condition is fulfilled ! = not xor Exactly one statement is evaluated as true

C ONDITIONAL S TATEMENTS If/ else After each statement stands ( ; ) If more than one command should be executed, use curly braces { } Switch / break Used for choosing one possibility from multiple cases Switch ($ var ) { case : “ x ” : echo “ good ”; break; default : echo “ wrong input ” ; }

A RRAYS IN PHP Numeric array Each element of array has its ID number (first 0!!) $ names = array( " Petr “," Joe " ); $ names [0] = " Petr "; Associative Arrays Each element is assigned its value $ ages = array(" Peter "=> 32, " Joe "=> 34 ); $ ages [' Peter '] = " 32 ";

M ULTIDIMENSIONAL A RRAYS element of array is also an array $ families = array ( " Griffin "=>array ( " Peter ", " Lois ", " Megan " ), " Soltis " =>array (“ Johny ", " Morgan " ) )

PHP L OOPING while loops repeat until final condition is reached $ i = 1 ; while ($ i<=10 ) { echo $ i ; $ i++ ; } do...while kind of reversed while function Do { code to be executed; } While( final condition );

PHP L OOPING for Repeats the specific part of code so many times we choose for ( $i=1; $i<=10; $i++ ) Initial condition final condition running decsription

HTML INSIDE PHP If inside quotes, the Html tags are returned as a text by PHP module Treated as a HTML tag by <?php echo " ".$i." ".$i*$i." \n"; ?>

PHP F UNCTIONS All function starts with function($ parameter ) Requirements for naming functions are same as these for variables The { mark opens the function code, while } mark closes it It can have either defined or no parameter More than 700 built-in functions available

PHP F ORMS AND U SER I NPUT Used to gain information from users by means of HTML Information is worked up by PHP Name: Age:

T HE $_GET V ARIABLE Used to collect values from a form Displays variable names and values are in the URL e=39 Can send limited amount of information (max. 100 characters) Welcome You are years old

T HE $_POST VARIABLE Used to collect values from a form Information from a form is invisible No limits on the amount of information to be send Welcome You are years old.