Copyright © 2003 Pearson Education, Inc. Slide 1-1 Web Design & Development PHP.

Slides:



Advertisements
Similar presentations
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 2 Getting Started.
Advertisements

Copyright © 2003 Pearson Education, Inc. Slide 1-1 The Web Wizards Guide to PHP by David A. Lash.
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 1 Introduction to Perl and CGI.
Introduction to JavaScript
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
Chapter 1: Introduction
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
1 Web Wizards Guide To PHP David Lash Chapter 1 Introduction to PHP.
HTML Recall that HTML is static in that it describes how a page is to be displayed, but it doesn’t provide for interaction or animation. A page created.
Multiple Tiers in Action
Introduction to HTML 2006 CIS101. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Introduction to HTML 2006 INT197B. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Introduction to PHP (Part-1) Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
Tutorial 1: Introduction to JavaScript JavaScript - Introductory.
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
Web Programming Introduction to PHP COM Objectives To understand what PHP is and how a PHP script works with a Web Browser and a Web Server To learn.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
Using C Programming Language.  The programs that run on a computer are referred to as software.  You’ll learn key programming methodology that are enhancing.
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.
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
The PHP Story. PHP Story PHP is a programming language. Incorporate(join) sophisticated business logic. Widely used general purpose scripting language.
Linux Operations and Administration
Java Programming, 2E Introductory Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
HTML Structure & syntax
Writing Web Pages By Shyam Gurram. Agenda Writing Web Pages Delimiting PHP Program Units. Displaying Output to Web Pages Putting Comments in PHP Programs.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
HTML INTRODUCTION, EDITORS, BASIC, ELEMENTS, ATTRIBUTES.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
Introduction to HTML. Slide 1 Hard-Coding What is hard-coding? –Creating the page in a text editor just using HTML A Web designer should know how to hard-
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
November 2003Bent Thomsen - FIT 6-11 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
HTML Structure & syntax. Introduction This presentation introduces the following: Doctype declaration HTML Tags, Elements and Attributes Sections of a.
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
Introduction to JavaScript CS101 Introduction to Computing.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Creating a Java Application and Applet
Chap 2 – Getting Started COMP YL Professor Mattos.
Creating PHP Pages Chapter 5 PHP Structure and Syntax.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Introduction to HTML Simple facts yet crucial to beginning of study in fundamentals of web page design!
1 2/16/05CS120 The Information Era Chapter 4 Basic Web Page Construction TOPICS: Intro to HTML and Basic Web Page Design.
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.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
REEM ALMOTIRI Information Technology Department Majmaah University.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
HTML Structure & syntax
HTML Structure & syntax
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
Introduction to HTML.
Chapter 6 JavaScript: Introduction to Scripting
CSC201: Computer Programming
JavaScript is a programming language designed for Web pages.
Introduction to Programming the WWW I
Introduction to Scripting
Java programming lecture one
WEB PROGRAMMING JavaScript.
Module 1 Introduction to PHP 11/30/2018 CS346 PHP.
Introduction to HTML Simple facts yet crucial to beginning of study in fundamentals of web page design!
JavaScript Basics What is JavaScript?
JavaScript is a scripting language designed for Web pages by Netscape.
HTML Structure & syntax
The Web Wizard’s Guide to PHP by David A. Lash
Presentation transcript:

Copyright © 2003 Pearson Education, Inc. Slide 1-1 Web Design & Development PHP

Copyright © 2003 Pearson Education, Inc. Slide 1-2 CHAPTER 1 Introduction to PHP

Copyright © 2003 Pearson Education, Inc. Slide 1-3 Reference Material Professional PHP Programming by Jesus Castagnetto et al. Published by Wrox Press. Readings provided periodically

Copyright © 2003 Pearson Education, Inc. Objectives To understand what PHP is and how a PHP script works with a Web Browser and a Web Server To learn what software and components you need to get started with PHP To create and run a simple PHP script

Copyright © 2003 Pearson Education, Inc. Slide 1-5 What Is PHP? Advantages of Using PHP to enhance Web pages: Easy to use. Open source. Multiple platform.

Copyright © 2003 Pearson Education, Inc. Slide 1-6 How PHP Pages are Accessed and Interpreted

Copyright © 2003 Pearson Education, Inc. Slide 1-7 Getting Started with PHP To develop and publish PHP scripts all you need is: A Web server with PHP built into it A client machine with a basic text editor and Internet connection FTP or Telnet software

Copyright © 2003 Pearson Education, Inc. Slide 1-8 Exploring the Basic PHP Development Process The basic steps you can use to develop and publish PHP pages are: 1. Create a PHP script file and save it to a local disk. 2. Use FTP to copy the file to the server. 3. Access your file using a browser.

Copyright © 2003 Pearson Education, Inc. Slide 1-9 Creating a PHP Script File and Saving It to a Local Disk You can use a number of different editors to create your PHP script files. The PHP script starts with a. Between these tags is a single PHP print statement.

Copyright © 2003 Pearson Education, Inc. Slide 1-10 Alternative PHP Delimiters You can alternatively start your PHP scripts with the tag as follows: print ("A simple initial script"); If have short_open_tag enabled in its configuration file, you can use. If asp_tags is enabled in the PHP configuration file, you can use as delimiters.

Copyright © 2003 Pearson Education, Inc. Slide 1-11 Copying Files To A Web Server with FTP 1. Connect to the Internet and start FTP. 2. Connect to your Web server with FTP. 3. Copy files to the Web server.

Copyright © 2003 Pearson Education, Inc. Slide 1-12 Accessing Your File Using a Browser

Copyright © 2003 Pearson Education, Inc. Slide 1-13 Proper Syntax If you have a syntax error then you have written one or more PHP statements that are grammatically incorrect in the PHP language. The print statement syntax:

Copyright © 2003 Pearson Education, Inc. If Use Improper Syntax Suppose you use the wrong syntax: 1. <?php 2. print ( “A simple initial script); 3. ?>

Copyright © 2003 Pearson Education, Inc. A Little About PHP's Syntax Some PHP Syntax Issues: Be careful to use quotation marks, parentheses, and brackets in pairs. Most PHP commands end with a semicolon (;). Be careful of case. PHP ignores blank spaces.

Copyright © 2003 Pearson Education, Inc. Embedding PHP Statements Within HTML Documents One way to use PHP is to embed PHP scripts within HTML tags in an HTML document HTML With PHP Embedded Welcome To My Page 6.<?php 7. print (" Using PHP is not hard "); 8.?> 9.and you can learn to use it quickly! 10.

Copyright © 2003 Pearson Education, Inc. Would Output The Following...

Copyright © 2003 Pearson Education, Inc. Slide 1-18 Using Backslash (\) to Generate HTML Tags with print() Sometimes you want to output an HTML tag that also requires double quotation marks. Use the backslash (“\”) character to signal that the double quotation marks themselves should be output: print (" "); The above statement would output:

Copyright © 2003 Pearson Education, Inc. Slide 1-19 Using Comments with PHP Scripts Comments enable you to include descriptive text along with the PHP script. Comment lines are ignored when the script runs; they do not slow down the run-time. Comments have two common uses. Describe the overall script purpose. Describe particularly tricky script lines.

Copyright © 2003 Pearson Education, Inc. Slide 1-20 Using Comments with PHP Scripts Comment Syntax - Use // <?php // This is a comment ?> Can place on Same line as a statement: <?php print ("A simple initial script"); //Output a line ?>

Copyright © 2003 Pearson Education, Inc. Slide 1-21 Example Script with Comments Generating HTML From PHP 3. Generating HTML From PHP 4. <?php 5. // 6. // Example script to output HTML tags 7. // 8. print ("Using PHP has some advantages: "); 9. print (" Speed Ease of use Functionality "); //Output bullet list 10. print (" "); 11. ?>

Copyright © 2003 Pearson Education, Inc. Slide 1-22 Alternative Comment Syntax PHP allows a couple of additional ways to create comments. <?php phpinfo(); # This is a built-in function ?> Multiple line comments. <?php /* A script that gets information about the PHP version being used. */

Copyright © 2003 Pearson Education, Inc. Slide 1-23 Summary You can embed a PHP script within an HTML document or run it as a stand-alone script. To begin working with PHP you need a Web server with built-in PHP, a client machine with a basic text editor, and FTP or Telnet software. PHP script process: write the PHP script, copy its file to the Web server, and access the file with a Web browser. Comments can be proceeded two forward slashes (//).