PHP Teresa Worner. What is it? PHP: Hypertext Preprocessor server-side scripting language open source cross-platform compatible with almost all servers.php.php3.phtml.

Slides:



Advertisements
Similar presentations
1 PHP Statement Constructs Server Scripting. 5-2 Basic Statement All Statements end in a semicolon. Statements are delimited from the HTML code by enclosing.
Advertisements

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 side basics.
Php. What is PHP? PHP is an acronym for "PHP Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on.
PHP By Dr. Syed Noman Hasany. PHP PHP was originally created by Rasmus Lerdorf in PHP stands for PHP: Hypertext Preprocessor (a recursive acronym).
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 Overview CS PHP PHP = PHP: Hypertext Preprocessor Server-side scripting language that may be embedded into HTML One goal is to get PHP files.
1 Introduction to PHP. 2 What is this “PHP” thing? Official description: “PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used Open Source.
PHP MOHAMMED SHURRAB TO MISS/ RASHA ATTALLAH. What is PHP? Stands for "PHP Hypertext Preprocessor" Server-side scripting language HTML-embedded Supports.
Intro to Web Programming using PHP, HTTP, CSS, and Javascript Layton Smith CSE 4000.
Introduction to PHP and Server Side Technology. Slide 2 PHP History Created in 1995 PHP 5.0 is the current version It’s been around since 2004.
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.
SCV1223 PHP - Hypertext Preprocessor. Introduction PHP is a powerful server-side scripting language for creating dynamic and interactive websites. PHP.
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
INTERNET APPLICATION DEVELOPMENT For More visit:
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
Nael Alian Introduction to PHP
Week 9 PHP Cookies and Session Introduction to JavaScript.
Chap 3 – PHP Quick Start COMP RL Professor Mattos.
Intro to PHP – Page 1 of 43CSCI 2910 – Client/Server-Side Programming CSCI 2910 Client/Server-Side Programming Topic: Intro to PHP Reading: Chapters 1.
November 2003Bent Thomsen - FIT 6-11 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
PHP By Sergio Rodriguez By Sergio Rodriguez. PHP G PHP: Hypertext Preprocessor G Scripting language G PHP: Hypertext Preprocessor G Scripting language.
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.
Open Source Software Unit – 3 Presented By Mr. R.Aravindhan.
PHP and JavaScript Nov. 26, 2013 Kyung Eun Park Computer and Creativity (COSC109) Towson University.
Variables and ConstantstMyn1 Variables and Constants PHP stands for: ”PHP: Hypertext Preprocessor”, and it is a server-side programming language. Special.
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.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
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.
PHP Arūnas Liuiza. PHP 101 What is PHP? Widely popular dynamic interpreted opensource programming language, aimed for web development Syntax is simmilar.
PHP Open source language for server-side scripting Works well with many databases (e.g., MySQL) Files end in.php,.php3 or.phtml Runs on all major platforms.
Week 4 PHP H ypertext P reprocessor Reference : Official Site :
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.
1 PHP Introduction Chapter 1. Syntax and language constructs.
Introduction to 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.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting PHP Basics.
FP512 WEB PROGRAMMING 1 PREPARED BY: PN. NUR SYUHADA BINTI MOHAMAD.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
Intro to PHP More About PHP. So far we've covered... Web Servers & Protocols Presentation Layer (static pages) For the rest of the semester... Application.
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.
Session 2: PHP Language Basics iNET Academy Open Source Web Development.
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,
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.
CGS 3066: Web Programming and Design Spring 2016 PHP.
PHP using MySQL Database for Web Development (part II)
Introduction to Dynamic Web Programming
DBW - PHP DBW2017.
Introduction to Web programming
PHP (PHP: Hypertext Preprocessor)
Server-Side Application and Data Management IT IS 3105 (Spring 2010)
PHP Introduction.
PHP.
Tutorial 6 PHP & MySQL Li Xu
PHP an introduction.
SEEM 4540 Tutorial 4 Basic PHP based on w3Schools
Presentation transcript:

PHP Teresa Worner

What is it? PHP: Hypertext Preprocessor server-side scripting language open source cross-platform compatible with almost all servers.php.php3.phtml

Installing PHP XAMPP – MySQL, PHP, Perl – C:\xampp\htdocs –

Embedding in HTML begin/end with tags <?php... ?> PHP parser ignores code outside PHP code run on server, result sent to client as HTML

Basic Syntax semicolons comments // single line comment # also a single line comment /* multi-line comment */ **Note: single line comments end at the end of the line OR at the closing PHP tag – whichever comes first!

Basic Syntax Cont’d if statements if ($var) //one line elseif ($var2) //one line else //one line print to screen echo “text”; if ($var) { //multi-line } else { //multi-line } if ($var): //multi-line else: //multi-line endif;

Variables $variableName – after $, must begin with letter or underscore, then any length of numbers/letters/underscores predefined variables – examples: $_POST[“name”] $_GET[“name”] $_FILES[“name”]

Constants define(“constName”, assignment) do not begin constName with $ bool, int, float, string

Types //loosely typed $var1 =“0”; $var1 += 2; //$var1 is now an integer of value 2 $var1 += 1.3; //$var1 is now a float of value 3.3 $var1 += “10 people”; //$var1 is float of value 13.3 $var1 += “hi”; //$var1 is float of value 13.3 $var2 = array(key => value, key2 => value2, );

Operators arithmetic, assignment, bitwise like C++ comparison $a == $b //true if $a equals $b after type juggling $a === $b //true if $a equals $b and same type $a != $b //not equal after type juggling $a <> $b //not equal after type juggling $a !== $b //not equal and not same type // =

Operators Cont’d Logical $a and $b $a && $b $a or $b $a || $b $a xor $b ! $a string $a. $b //concatenation

Operators Cont’d array $a + $b //union of $a and $b $a == $b //true if $a and $b have same key/value pairs $a === $b //same key/value pairs, order, and types $a != $b //not equal $a <> $b //not equal $a !== $b //not identical

Functions many built-in functions: user declared: function funcName($var1, $var2) { return $var1 + $var2; }

Sessions session_start – starts or resumes session – default setting saves session ID in cookie $_SESSION – superglobal array for session variables – $_SESSION[“variableName”] session_unset – frees session variables session_destroy – destroys session but does not free session variables or delete cookie

Other Stuff classes class ClassName {... } try-catch try {... } catch(Exception $e) {... }

Useful References