Open Source Software Unit – 3 Presented By Mr. R.Aravindhan.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

XAMPP: Cross – Apache, MySQL, Php, Perl + FileZilla, Tomcat NetBeans: IDE PHP Installation.
ASP.NET Programming with C# and SQL Server First Edition
JavaScript, Third Edition
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 Workshop ‹#› PHP: The Basics. PHP Workshop ‹#› What is it? PHP is a scripting language commonly used on web servers. –Stands for “PHP: Hypertext Preprocessor”
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.
ALBERT WAVERING BOBBY SENG. Week Whatever: PHP  Announcements/questions/complaints.
Outline o What is an array ? o Indexed array o Associative array o Multidimensional array.
04/09/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Programming with php By: Seth Larson. A little bit about PHP  PHP stands for PHP:  Hypertext Preprocessor  PHP is a widely-used general-purpose server-side.
PHP Tutorial By RAY BALIKI && ROY GHORAYEB. DEFINITION PHP is a powerful server-side scripting language for creating dynamic and interactive websites.
INTERNET APPLICATION DEVELOPMENT For More visit:
Mandakini Ayushi Infotech Mandakini Kumari 22 nd July PHP Basic.
PHP H ypertext P re-processor. Unit 6 - PHP - Hello World! - Data types - Control structures - Operators.
PHP - Hypertext Preprocessor. Introduction PHP is a powerful server-side scripting language for creating dynamic and interactive websites. PHP is a powerful.
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 Arrays. Outline o What is array in PHP ? o Numeric array o Associative array o Multidimensional array.
Nael Alian Introduction to PHP
2440: 211 Interactive Web Programming Expressions & Operators.
PHP - Introduction Week 5 Dr. Ken Cosh Introducing PHP 1.
Introduction to PHP A user navigates in her browser to a page that ends with a.php extension The request is sent to a web server, which directs the request.
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.
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.
Introduction to Web Programming. Introduction to PHP What is PHP? What is a PHP File? What is MySQL? Why PHP? Where to Start?
PHP Teppo Räisänen LIIKE/OAMK PHP PHP is a programming language for making dynamic and interactive Web pages.
Introduction to 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 Introduction PHP is a server-side scripting language.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting PHP Basics.
JavaScript. JavaScript Introduction JavaScript is the world's most popular programming language. It is the language for HTML and the web, for servers,
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Basic Scripting & Variables Yasar Hussain Malik - NISTE.
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.
Introduction to PHP 1.What is PHP? What Is PHP?  php: hypertext preprocessor  Server-side scripting language—like ASP—scripts are executed on server.
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-Basic By- Tanvi Raval. Pre-requisites Before you continue you should have a basic understanding of the following: 1. HTML 2. JavaScript.
11 – Introduction to PHP(1) Informatics Department Parahyangan Catholic University.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
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.
PHP stands for …….. “PHP Hypertext Pre-processor” and is a server-side scripting language like ASP. PHP scripts are executed on the server PHP supports.
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
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:
Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do this.
Click to edit Master subtitle style 03/02/11 Web And Coding Club IIT Bombay PHP (pre hypertext processor) By: Saurabh Goyal Apekshit Sharma.
PHP using MySQL Database for Web Development (part II)
Session 2 Basics of PHP.
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
8th Semester, Batch 2008 Department of Computer Science SSUET.
PHP Introduction.
Basic PHP Lecture by Nutthapat Keawrattanapat
PHP.
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
Tutorial 6 PHP & MySQL Li Xu
PHP an introduction.
PHP PROF. S. LAKSHMANAN, DEPT. OF B. VOC. (SD & SA),
SEEM 4540 Tutorial 4 Basic PHP based on w3Schools
Presentation transcript:

Open Source Software Unit – 3 Presented By Mr. R.Aravindhan

OPEN SOURCE PROGRAMMING LANGUAGES PHP: Introduction – Programming in web environment – variables – constants – Data types – operators – Statements – Functions – Arrays – OOP – String Manipulation and regular expression – File handling and data storage – PHP and SQL database –PHP and LDAP – PHP Connectivity – Sending and receiving s – Debugging and error handling – Security – Templates.

PHP: Introduction PHP is a powerful tool for making dynamic and interactive Web pages. PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP. In our PHP tutorial you will learn about PHP, and how to execute scripts on your server.

PHP Introduction PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.) PHP is an open source software PHP is free to download and use

What is a PHP File? PHP files can contain text, HTML tags and scripts PHP files are returned to the browser as plain HTML PHP files have a file extension of ".php", ".php3", or ".phtml"

Programming in web environment Variables Variables are used for storing values, like text strings, numbers or arrays. When a variable is declared, it can be used over and over again in your script. All variables in PHP start with a $ sign symbol. The correct way of declaring a variable in PHP: $var_name = value;

PHP is a Loosely Typed Language In PHP, a variable does not need to be declared before adding a value to it. In the example above, you see that you do not have to tell PHP which data type the variable is. PHP automatically converts the variable to the correct data type, depending on its value.

Naming Rules for Variables A variable name must start with a letter or an underscore "_" A variable name can only contain alpha- numeric characters and underscores (a-z, A-Z, 0-9, and _ ) A variable name should not contain spaces. If a variable name is more than one word, it should be separated with an underscore ($my_string), or with capitalization ($myString)

Constants A PHP constant is a variable that cannot be changed after the initial value is assigned during the execution of the script, except for magic constants, which are not really constants.

Example Program <?php define ("SECE", "Sri Eshwar College Of Engineering"); echo SECE; ?>

Data Type PHP scripts deal with data in one form or another, usually stored in variables. PHP can work with different types of data. For example, a whole number is said to have an integer data type, while a string of text has a string data type.

PHP's scalar data types TypeDescription IntegerA whole number floatA floating point number stringA sequence of characters unicodeA sequence of Unicode character binaryA sequence of binary booleanEither true or false

Operators Arithmetic Operators OperatorDescriptionExampleResult +Addition x=2 x+2 4 -Subtraction x=2 5-x 3 *Multiplication x=4 x*5 20 /Division 15/5 5/ %Modulus 5%2 10%8 10% Increment x=5 x++ x=6 --Decrementx=5 x-- x=4

Assignment Operators OperatorExampleIs The Same As =x=y +=x+=yx=x+y -=x-=yx=x-y *=x*=yx=x*y /=x/=yx=x/y.=x.=yx=x.y %=x%=yx=x%y

Comparison Operators OperatorDescriptionExample ==is equal to5==8 returns false !=is not equal5!=8 returns true <> is not equal5<>8 returns true > is greater than5>8 returns false < is less than5<8 returns true >=is greater than or equal to5>=8 returns false <=is less than or equal to5<=8 returns true

Operator Precedence * / % Highest Precedence + -. >= = = = != = && | And XOR OR Lowest Precedence

Statements if, elseif, else switch while For foreach break continue

foreach Versions of PHP prior to version 4 do not support the foreach statement. The following code should list the contents of the array. <?php $tree = array("trunk", "branches", "leaves"); foreach ($tree as $part) { echo "Tree part: $part "; }?>

Functions A function is a block of code that performs a specific task. It has a name and it is reusable. To keep the script from being executed when the page loads, you can put it into a function. A function will be executed by a call to the function. You may call a function from anywhere within a page.

User-defined functions A function may be defined using syntax such as the following: PHP function guidelines: Give the function a name that reflects what the function does The function name can start with a letter or underscore (not a number)

Example Program "; } echo "My name is "; writeName("Kai Jim"); echo "My sister's name is "; writeName("Hege"); echo "My brother's name is "; writeName("Stale"); ?>

Arrays A variable is a storage area holding a number or text. The problem is, a variable will hold only one value. An array is a special variable, which can store multiple values in one single variable. $cars1="Saab"; $cars2="Volvo"; $cars3="BMW";

Array Introduction Each element in the array has its own index so that it can be easily accessed. In PHP, there are three kind of arrays: Numeric array - An array with a numeric index Associative array - An array where each ID key is associated with a value Multidimensional array - An array containing one or more arrays

Numeric Arrays A numeric array stores each array element with a numeric index. There are two methods to create a numeric array. 1. $cars=array("Saab","Volvo","BMW","Toyota"); 2. $cars[0]="Saab"; $cars[1]="Volvo"; $cars[2]="BMW"; $cars[3]="Toyota";

Example

Associative Arrays An associative array, each ID key is associated with a value. When storing data about specific named values, a numerical array is not always the best way to do it. With associative arrays we can use the values as keys and assign values to them.

Example $ages = array("Peter"=>32, "Quagmire"=>30, "Joe"=>34); or $ages['Peter'] = "32"; $ages['Quagmire'] = "30"; $ages['Joe'] = "34";

Multidimensional Arrays In a multidimensional array, each element in the main array can also be an array. And each element in the sub-array can be an array, and so on.

Thank You