ALBERT WAVERING BOBBY SENG. Week Whatever: PHP  Announcements/questions/complaints.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

IST 221 Internet Concepts and Applications Introduction to PHP.
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.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Server side basics CS URLs and web servers  Usually when you type a URL in your browser:  Your computer looks up the server's IP address using.
PHPPHP What is PHP? Hypertext Pre-processor (PHPs) is a server- side scripting language In early versions, PHP stand for Personal Home Page. server-side.
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.
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.
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 : Hypertext Preprocessor
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
INTERNET APPLICATION DEVELOPMENT For More visit:
PHP H ypertext P re-processor. Unit 6 - PHP - Hello World! - Data types - Control structures - Operators.
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
Chap 3 – PHP Quick Start COMP RL Professor Mattos.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
20-753: Fundamentals of Web Programming 1 Lecture 12: Javascript I Fundamentals of Web Programming Lecture 12: Introduction to Javascript.
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.
PHP Programming with MySQL Slide 4-1 CHAPTER 4 Functions and Control Structures.
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.
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.
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.
JavaScript Syntax and Semantics. Slide 2 Lecture Overview Core JavaScript Syntax (I will not review every nuance of the language)
EIW - ASP Introduction1 Active Server Pages VBScript.
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.
ALBERT WAVERING BOBBY SENG. Week 4: JavaScript  Quiz  Announcements/questions.
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.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
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.
PHP A very brief introduction PHP1. PHP = PHP: Hypertext Processor A recursive acronym! PHP scripts are executed on the server side Executed by (a plugin.
CHAPTER 6 Introduction to PHP5 Part I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
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.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
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,
CSE 154 LECTURE 14: INTRO TO PHP. URLs and web servers usually when you type a URL in your browser: your computer looks up the.
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
CHAPTER 5 SERVER SIDE SCRIPTING
DBW - PHP DBW2017.
PHP Introduction.
PHP.
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
Intro to PHP.
Tutorial 6 PHP & MySQL Li Xu
JavaScript CS 4640 Programming Languages for Web Applications
PHP: Hypertext Preprocessor
PHP an introduction.
Web Application Development Using PHP
JavaScript CS 4640 Programming Languages for Web Applications
Presentation transcript:

ALBERT WAVERING BOBBY SENG

Week Whatever: PHP  Announcements/questions/complaints

What is PHP?  Server-side scripting language  PHP: Hypertext Processor  Created in 1995; current version  Dynamically typed (like JavaScript)  Other scripting languages:  Microsoft ASP  Adobe ColdFusion  Java (using JSP)  Ruby (using Rails)

PHP  Scripts are stored on a server  Interpreted on servers when a page is requested  I request example.php  Server looks up the file  PHP software processes PHP file  Output is HTML+CSS+JavaScript that is returned as the requested page

Real Life Examples  Facebook  ‘Compressed’ PHP  Wikipedia  Photobucket  Yahoo!  YouTube

PHP  Can run on most operating systems  Compatible with most servers (Apache, IIS, etc)  Lets you create dynamic webpages  Most useful when you want to insert specific custom data  Where does this data come from?  Databases!

PHP + MySQL  MySQL is a Structured Query Language database platform  PHP has native built-in support for MySQL  While interpreting a PHP script, PHP software can make multiple requests to multiple MySQL databases  PHP also supports many other databases

PHP Basics  PHP Script can contain:  HTML  CSS  JavaScript  PHP script  PHP files have extension.php  If you save them as.html, the PHP software will not process them  Closed source – your users cannot read your code (unlike JavaScript)

PHP Basics  PHP scripts are written inside a tag  Anything you want interpreted has to be inside these tags  Example:

PHP Basics  Like Java, every line in PHP ends with a semicolon;  //Single-line comments  /* Multi-line comments */

PHP Basics  PHP variable names are always preceded by a $  Assigning a value to a variable: $variable_name = value;  PHP variables are loosely typed  Don’t have to declare variables before using them  Can reassign variables to hold different types of values

PHP Basics  Variables can only include alphanumeric characters and the underscore  Variables must start with a letter or an underscore  PHP variables have a single scope, usually  Variables in functions are limited to those functions  The keyword global will use global variables inside a function

The global keyword

Operators +Addition+= -Subtraction-= *Multiplication*= /Division/= %Modulus%= ++Increment --Decrement =Assignment.=Concatenate (Strings)

Comparison Operators ==Equal to !=Not equal to<> <Less than <=Less than or equal to >Greater than >=Greater than or equal to

Logical Operators &&andAND ||orOR !not xorXOR

If/elseif/else if (condition) statement; elseif (condition) statement; else statement;

Switch switch(variable){ case a: statement; break; case b: statement; break; default: statement; }

Loops while (condition){ statements; } for (initialization; condition; increment){ statements; }

Arrays  Numerically indexed  Associatively indexed (maps)  Multidimensional (combination of one or any of the above)  Create an array with $var_name = array();  Index with $var_name[0] = assignment; or $var_name[$other_var] = assignment;

PHP GET  Built-in functions to get data from pages  $_GET function collects values from a form sent with method = get HTML Page: Name: Age: PHP Response: Welcome. You are years old!

PHP POST  Get is limited to 100 characters  Not awesome  Post has 8Mb maximum  Awesome

PHP Post HTML Page: Name: Age: PHP Response: Welcome. You are years old!

Resources  Ask Jeeves  AltaVista   Language Reference  Your new best friend  Code examples, user questions, hints 

Homework  Create a PHP script that outputs the current date to a page, inserted among other usual HTML elements in a full page   Use one additional construct of PHP (array, loop, if/else, etc)  Upload to your account on my server as a.php file by the start of next class  Be creative!  Databases next time (real fun starts)