PHP 4: Introduction 

Course Specifications 
Course number: 077200
Course length: 1 DOT

Course Description

Overview:   PHP 4: Introduction explores all of the major elements of PHP programming. With PHP, you can build dynamic, data-driven Web sites that use a variety of databases. Easy-to-understand code samples are used to demonstrate the many elements and techniques used in PHP programming.

Prerequisites:   To ensure your success, we recommend you first take the following Element K courses or have equivalent knowledge:
·	HTML Programming: Level 1
·	HTML Programming: Level 2
·	Introduction to Programming
·	SQL Fundamentals of Querying

Delivery Method:   Instructor-led, group-paced, classroom-delivery learning model with structured hands-on and minds-on activities.

Benefits:  After completing this course you will be able to immediately use PHP to create impressive Web sites.

Target student:  PHP 4: Introduction is designed for the student who is well versed in HTML, and who has had at least some experience with scripting languages and SQL. This is a serious programming course—it is not intended for students who have created Web sites only with a WYSIWYG editor (for example, MS FrontPage) and have never gotten into HTML coding by hand, let alone scripting or working with SQL databases.

Hardware/Software Requirements: You will need: 
·	A 133 MHz or faster Pentium-based PC.
·	32 MB of RAM (64 MB recommended).
·	75 MB or more of hard disk space.
·	Monitor capable of displaying 800 x 600 pixels at 256 colors or more.
·	Microsoft Windows 98. PHP requires a different configuration depending on the version of Windows you are using. This course is designed for Windows 98 and has not been tested using other Windows operating systems.
·	Microsoft Internet Explorer 5.0 or higher.
·	PHP version 4.0.4 (included on course data files CD).
·	MySQL version 3.23.35a (included on course data files CD).
·	Microsoft Personal Web Server 4.0.
·	A text editor; for example, Notepad.

Performance-Based Objectives
Lesson objectives help students become comfortable with the course, and also provide a means to evaluate learning. Upon successful completion of this course, students will be able to:
·	Describe what PHP is and the advantages to creating Web sites with PHP.
·	Use variables, arrays, and functions in PHP scripts.
·	Include other files in PHP scripts and manipulate files and directories.
·	Process forms and validate their information.
·	Incorporate hidden form fields, cookies, and session variables in PHP scripts.
·	Add, update, and delete records in a database using PHP.

Course Content

Lesson 1: Introduction to PHP
          Topic 1A: What is PHP?
                   Task 1A-1: Understanding PHP
          Topic 1B: Basic Syntax of PHP
                   Task 1B-1: Writing Your First PHP Script
                   Task 1B-2: Incorporating HTML in PHP Scripts
                   Task 1B-3: Commenting Your PHP Code

Lesson 2: Common PHP Script Elements
          Topic 2A: Using Variables
                   Task 2A-1: Experimenting with Variables      
          Topic 2B: Working With Arrays
                   Task 2B-1: Creating an Associative Array
          Topic 2C: Using Functions
                   Task 2C-1: Exploring Functions

Lesson 3: File and Directory Handling
          Topic 3A: Including Files
                   Task 3A-1: Writing the Include Files
          Topic 3B: File Access
                   Task 3B-1: Creating a Hit Counter
                   Task 3B-2: Creating a Directory Navigation Script    

Lesson 4: Working With Forms
          Topic 4A: Processing Forms
                   Task 4A-1: Using Arrays to Process Form Information
          Topic 4B: Form Validation
                   Task 4B-1: Validating Form Data
                   Task 4B-2: Using the HTMLSpecialChars Function
          Topic 4C: E-Mailing Form Data
                   Task 4C-1: Adding E-Mail Functionality

Lesson 5: Addressing the Stateless Nature of HTTP
          Topic 5A: Hidden Form Fields
                   Task 5A-1: Using Hidden Form Fields
          Topic 5B: Cookies
                   Task 5B-1: Setting a Cookie
          Topic 5C: Sessions
                   Task 5C-1: Setting Session Variables

Lesson 6: Accessing Databases With PHP
          Topic 6A: Interacting With Databases
                   Task 6A-1: Connecting to the MySQL Server
                   Task 6A-2: Retrieving Data   
          Topic 6B: Modifying Database Records Using PHP
                   Task 6B-1: Adding a Record
                   Task 6B-2: Updating a Record in the Database