Site Sections => About Us | Consultancy | Training | Software | Publications | Open Source | Support | Open Standards | FAQ | Jobs
Site Style Info

PHP for Programmers - A 3 Day Course

Synopsis

A PHP course designed for experienced programmers who want to build dynamic e-commerce web sites using the PHP programming language. Since PHP is such a rich and task-specific language, the course covers in depth the most important range of functions and equips delegates to understand the remaining less essential aspects.

Suitable For

Software developers with no PHP experience and possibly no web programming experience. Students must, however, have strong foundation in general programming. Those with knowledge of C-like languages, especially Perl, should be able to progress quickly through the course.

Groups with limited experience of C-like languages may wish to extend PHP courses beyond the usual 3 days.

Prerequisites

  • A basic working knowledge of HTML is presumed.
  • Some conceptual knowledge of how web servers and web browsers (clients) interact using HTTP
  • Good working knowledge of at least one programming language

Delivery

This is a hands-on practical PHP workshop based around the development of fully working website services.

At present this instructor-led PHP course is designed primarily for in-house delivery to corporate groups. This usually takes place on-site, i.e. at the premises of the purchasing company. Information about the setup requirements for in-house courses is available on a separate page.

Arrangements can be made for off-site training at a range of facilities, although this can incur costs which have to be added to our normal charges for tuition and course materials.


Contents

Introduction to PHP

  • History of PHP
  • Comparison with dynamic content alternatives (Perl, CGI, ASP, JSP, Servlets , CGI, etc)
  • PHP tools and set up (web browser/server, editor, libraries, etc)
  • Create a basic PHP Script
  • Taking user input
  • Self Referring Forms
  • Selecting alternatives
  • Use PHP to generate HTTP headers
  • Pass PHP variables via the URL
  • Debugging Tips

Taking User Input from Forms via PHP

  • Creating forms with PHP
  • Security Protection from Cross Site Scripting
  • Using the form GET method
  • Using the form POST method
  • Obtaining data from forms through variables
  • Using hidden fields
  • Secure Web Forms
  • Calling pages from themselves using forms
  • Quoting HTML entities in user input

Variables and Expressions in PHP

  • Identifiers
  • Data Types (integers, floats, strings and booleans)
  • Text constants, interpolation, here documents
  • Creating Variables
  • Variable assignment
  • Variable Scope
  • User-defined Constants
  • HTTP environment variables
  • Magic Constants
  • Variable References

PHP Operators

  • Arithmetic Operators
  • Logical Operators
  • Relational Operators
  • The Identity Operator
  • Bitwise Operators
  • Other Operators
  • Assignment Operators
  • Operator Precedence and Associativity

Conditional Tests and Events in PHP

  • True and False
  • If
  • Comparing Strings and Numbers
  • else and elseif
  • The switch / case statement
  • The ? : Operator
  • Comparing for equality or identity

PHP Flow Control

  • Loops
  • while
  • do ... while
  • for
  • break and continue
  • exit

PHP Configuration

  • The php.ini file
  • Module Vs CGI Usage
  • register_globals
  • Commonly set configurations
  • PHP 4.1 and above
  • PHP4 compatibility in PHP5
  • A glance at upcoming PHP6

PHP Functions

  • Purpose of functions
  • Built-in functions
  • Declaring functions
  • Functions Arguments
  • Arguments - Call by Reference
  • Default Arguments
  • Return
  • Returning References
  • Variable Scope (global vs local)
  • Static variables
  • Recursion
  • include and require
  • Variable function calls

Storing Data in Arrays using PHP

  • What are arrays?
  • How and when to use arrays
  • Indexing arrays, numeric and hashes
  • Initialising arrays
  • Using foreach
  • Add/remove info from arrays
  • One-dimensional arrays
  • Multi-dimensional arrays
  • Array operators
  • Array related functions

Handling Databases with PHP

  • PHP's database APIs
  • Error-handling strategies
  • Connection/disconnection, log in/log out
  • Escaping strings in SQL statements
  • Including common access functions
  • Doing simple SQL queries via PHP
  • Building HTML tables using SQL Queries
  • Show access to: MySql, Oracle & MS-SQL
  • Using PEAR DB

String Manipulation in PHP

  • substring and [] operators
  • Case conversion, trimming
  • Formatting output data
  • Regular expressions

Sessions and Cookies in PHP

  • What is a session?
  • Dependencies on the php.ini file
  • Understanding PHP session variables
  • Create a PHP session variable
  • Register and modify PHP session variables
  • Putting PHP session IDs in pages
  • Good Practise with sessions and PHP
  • Cookie properties
  • Setting a cookie in PHP
  • Retrieving PHP cookies
  • Expiring/Deleting PHP cookies
  • Drawbacks to cookies
  • Using cookies well
  • Cookie Security Issues

File and Directory Access Using PHP

  • Opening files, local and remote
  • Reading and writing files
  • Handling file permissions
  • Handling file ownership
  • File locking
  • Opening and reading directories
  • File uploads from the browser/user

Other I/O Issues in PHP

  • Getting IP addresses from visitors
  • Getting referring URLs from visitors
  • Environment variables
  • Showing different content to different browsers (IE, Netscape, Mozilla, Opera, etc)
  • Handling HTTP and MIME headers

Handling Email with PHP

  • Sending email
  • Unix and NT setup
  • mail function

Object Orientation in PHP

  • Object basics
  • Classes in PHP
  • PHP4 - constructors
  • PHP5 - constructors and destructors
  • Inheritance
  • Accessing instance data and functions
  • __sleep and __wakeup
  • Class constants
  • PHP5 OO Additions
  • Objects: Assignments and References

SOAP

  • SOAP Overview
  • Simple SOAP Client
  • Simple SOAP Server

PEAR, PECL and Smarty

  • PECL quick tour
  • APC - Alternative PHP Cache
  • PEAR installation and quick tour
  • PEAR Config
  • PEAR Log
  • PEAR Auth
  • PEAR HTML_Quickform
  • Smarty Templates
  • Smarty and HTML_Quickform
  • Smarty and Quickform help with security

Graphics in PHP

  • Graphics basics
  • Image MIME type
  • Basic examples
  • Creation from an existing image
  • Image copying and resizing
  • Drawing text on images
  • True Type fonts

PHP training UK enquiries

UK Training enquiries and feedback form.

PHP training UK prices

For publicly scheduled training (individual places), see our UK training schedule.

In-house training for company groups is charged at a daily rate per group — see our In-House UK Training Guidelines.

Publicly Scheduled Training Locations

We currently run public training courses in the following locations:

  • London, UK
  • Leeds, West Yorkshire, UK
  • Birmingham, West Midlands, UK
  • Carshalton, Surrey, UK
  • Chester, North West, UK
  • Coventry, West Midlands, UK
  • Edinburgh, Scotland, UK
  • Glasgow, Scotland, UK
  • Harwell, Oxfordshire, UK
  • Manchester, North West, UK
  • Milton Keynes, Buckinghamshire, UK
  • Newark, Nottinghamshire, UK
  • Reading, Berkshire, UK
  • Slough, Berkshire, UK
  • Stevenage, Hertfordshire, UK
  • Wakefield, West Yorkshire, UK
  • Wokingham, Berkshire, UK

Most UK public training courses are available on a monthly basis.

Please see the individual course outlines or our public training schedule for details.

In-house (on-site) training locations

We deliver in-house courses at client premises and/or training facilities in any part of the world which is practically and commercially accessible.

Our In-house training guidelines outline our basic requirements and our UK pricing structure. To estimate costs for training in other countries, simply convert to your local currency and then make a rough calculation of our tutor's costs for travelling to and staying at your location.


West Yorkshire Office

GBdirect Ltd
Training Division
Bradford Design Exchange
34 Peckover Street
BRADFORD
BD1 5BD
West Yorkshire
United Kingdom

training@gbdirect.co.uk

Training: 0800 651 0338
General: +44 (0)870 200 7273
Finance: +44 (0)1353 615 174

Please call between 0900 and 1700 (UK time) on Monday to Friday


South East Regional Office

GBdirect Ltd
Training Division
18 Lynn Rd
ELY
CB6 1DA
Cambridgeshire
United Kingdom

training@gbdirect.co.uk

Training: 0800 651 0338
General: +44 (0)870 200 7273
Finance: +44 (0)1353 615 174

Please call between 0900 and 1700 (UK time) on Monday to Friday


Please note:
Non-training enquiries should be directed, initially, to our UK national office in Bradford (West Yorkshire), even if the enquiry concerns services delivered in London or South/East England. Clients in London and the South East will typically be handled by staff working in the London or Cambridge areas.