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

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

The Web Warrior Guide to Web Design Technologies
Software Freedom Day th September 2007 Asia Pacific Institute of Information Technology Colombo, Sri Lanka. Nazly Ahmed Scripting The Web.
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.
Server & Client  Client: Your computer  Server: Powerful & Expensive computer. Requires network access.
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).
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.
CSC 318 WEB APPLICATION DEVELOPMENT.  Introduction to Server Scripting language  Client VS Server  Introduction to PHP  PHP Files and Syntax  Function.
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.
An Introduction to PHP The University of Tennessee at Chattanooga C. Daniel Chase “An introduction to basic PHP use with a focus on the power of dynamic.
PHP. Why should we learn web programming? No need write socket programming. - You can forget TCP/IP & OSI layers. - Web server handles socket tasks for.
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.
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.
November 2003Bent Thomsen - FIT 6-11 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
PHP - Introduction Week 5 Dr. Ken Cosh Introducing PHP 1.
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.
PHP OVERVIEW. C ONTENT Introduction of PHP History and development Basics of PHP programming.
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.
Web Programming Language Week 5 Dr. Ken Cosh Introducing PHP 1.
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.
Julian Springer Room 42 Joe Slovo.  W3 schools recommend that you have a basic understanding of HTML and of JavaScript before attempting to grasp PHP.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
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.
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.
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
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.
1) PHP – Personal Home Page Scripting Language 2) JavaScript.
©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.
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.
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 using MySQL Database for Web Development (part II)
Introduction to Dynamic Web Programming
DBW - PHP DBW2017.
PHP (PHP: Hypertext Preprocessor)
PHP Introduction.
Skulbong Taisawapak ID:
PHP.
Web DB Programming: 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 Scripting language suited for web development 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 The HTML code stands as it is The PHP scripts are executed to create final HTML code Both parts are combined and back 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 3 The scripting core was rewritten by Zeev Suraski and Andi Gutmans The name was changed to Hypertext preprocessor It is able to work with MS Windows and MaCintosh PHP4 Added Zend engine Introduced 'superglobals' ($_GET) None of these versions is under development now

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 Uses standard mathematical operators +,-,/,* Special symbol ++ (--) for increase (decrease) by 1 Comparison operators >, = Special cases == is equal != is different Assignment operators x+=y  x=x+y

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 Similar as in C 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 =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.

T HANK YOU FOR YOUR ATTENTION !

S OURCES