 A PHP script can be placed anywhere in the document.  A PHP script starts with  The default file extension for PHP files is ".php".  A PHP file normally.

Slides:



Advertisements
Similar presentations
Introduction to JavaScript
Advertisements

Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
Made by: Dan Ye. Introduction Basic Last Page ☆ HTML stands for Hyper Text Markup Language; ☆ HTML is not a programming language, it is a markup language;
Basic HTML. Guide to HTML code Not case sensitive Use tag for formatting output: new line, paragraph, text size, color, font type, etc. Can be a single.
1 Web Wizards Guide To PHP David Lash Chapter 1 Introduction to PHP.
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.
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.
Chapter 4 Mixing PHP and HTML  In this chapter, you’ll learn how to do the following: -Recognize and use the different kinds of PHP start and end tags.
PHP: Hypertext Processor Fred Durao
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.
PHP == ‘ Hypertext Preprocessor ’ Open-source, server-side scripting language Used to generate dynamic web-pages PHP scripts reside between reserved PHP.
ITD 3194 Web Application Development Chapter 4: Web Programming Language.
PHP H ypertext P re-processor. Unit 6 - PHP - Hello World! - Data types - Control structures - Operators.
University of Sunderland Lecture 1 Internet Software Architectures Lecture 1: Introduction.
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
Writing Web Pages By Shyam Gurram. Agenda Writing Web Pages Delimiting PHP Program Units. Displaying Output to Web Pages Putting Comments in PHP Programs.
Web Pages: Creating & Maintaining Body Tags. There have been several versions of HTML since its inception. VersionYear HTML1991 HTML HTML
Integrating JavaScript and HTML5 HTML5 & CSS 7 th Edition.
IST 210: PHP BASICS IST 210: Organization of Data IST210 1.
Basic HTML PowerPoint How Hyper Text Markup Language Works
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
CSC 330 E-Commerce Teacher Ahmed Mumtaz Mustehsan Ahmed Mumtaz Mustehsan GM-IT CIIT Islamabad GM-IT CIIT Islamabad CIIT Virtual Campus, CIIT COMSATS Institute.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
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?
Comments in PHP In PHP, we use // to make a singleline comment or /* and */ to make a large comment block. Comment is a part of your PHP code that will.
Week 4 PHP H ypertext P reprocessor Reference : Official Site :
Strings, output, quotes and comments
JavaScript Syntax, how to use it in a HTML document
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.
Lecture Note 8: ASP Including Files and The Global.asa file.
HTML Basics Computers. What is an HTML file? *HTML is a format that tells a computer how to display a web page. The documents themselves are plain text.
PHP. PHP User Defined Functions Besides the built-in PHP functions, we can create our own functions. A function is a block of statements that can be used.
הרצאה 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.
HTML JAVASCRIPT. CONTENTS Javascript Example NOSCRIPT Tag Advantages Summary Exercise.
CHAPTER 6 Introduction to PHP5 Part I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Introduction into JavaScript Java 1 JavaScript JavaScript programs run from within an HTML document The statements that make up a program in an HTML.
Basic HTML.
CST336, Dr. Krzysztof Pietroszek Week 2: PHP. 1.Introduction to PHP 2.Embed PHP code into an HTML web page 3.Generate (output HTML) web page using PHP.
Chap 2 – Getting Started COMP YL Professor Mattos.
Fall 2004CSI University of Ottawa Introduction to PHP Basic principles and syntax.
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.
ASP.NET – Active Server Pages ASP.NET is a server-side technology for developing web applications based on the.NET Framework.
PHP Reusing Code and Writing Functions 1. Function = a self-contained module of code that: Declares a calling interface – prototype! Performs some task.
PHP Syntax You cannot view the PHP source code by selecting "View source" in the browser - you will only see the output from the PHP file, which is plain.
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,
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
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.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
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 Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
PHP using MySQL Database for Web Development (part II)
Introduction to Dynamic Web Programming
PHP 5 Syntax.
Introduction to Web programming
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
PHP Introduction.
PHP.
Tutorial 6 PHP & MySQL Li Xu
Introduction to PHP.
PHP an introduction.
SEEM 4540 Tutorial 4 Basic PHP based on w3Schools
Presentation transcript:

 A PHP script can be placed anywhere in the document.  A PHP script starts with  The default file extension for PHP files is ".php".  A PHP file normally contains HTML tags, and some PHP scripting code.

 Below, we have an example of a simple PHP file, with a PHP script that uses a built-in PHP function "echo" to output the text "Hello World!" on a web page:  Code  My first PHP page

 Hello World!

 A comment in PHP code is a line that is not read/executed as part of the program.  Its only purpose is to be read by someone who is looking at the code.  Remind yourself of what you did.  PHP supports several ways of commenting.

<?php // This is a single-line comment # This is also a single-line comment /* This is a multiple-lines comment block that spans over multiple lines */ // You can also use comments to leave out parts of a code line $x = 5 /* + 15 */ + 5; echo $x; ?>

 In PHP, all keywords (e.g. if, else, while, echo, etc.), classes, functions, and user-defined functions are NOT case sensitive.  In the example below, all three echo statements below are legal (and equal):

"; echo "Hello World! "; EcHo "Hello World! "; ?>

Hello World! Hello World! Hello World!

 All variable names are case-sensitive.  In the example below, only the first statement will display the value of the $color variable (this is because $color, $COLOR, and $coLOR are treated as three different variables):

"; echo "My house is ". $COLOR. " "; echo "My boat is ". $coLOR. " "; ?>

My car is red My house is // it does not show color name My boat is // it does not show color name