PHP & MySQL Introduction

3 days

Course Overview

MySQL™ and PHP are two of the most popular open source technologies to emerge during the past
decade. PHP is a powerful language for writing server-side Web applications. MySQL is the world’s
most popular open source database. Together, these two technologies provide you with a powerful
platform for building database-driven Web applications.
Aspect Training’s Introduction to PHP training course examines the core concepts and technologies
required to build a basic dynamic website using PHP. The Introduction to PHP training begins by
examining how to setup and configure Apache to support PHP and then our Introduction to PHP
training moves on to explore the language fundamentals of PHP. The Introduction to PHP training
concludes with a discussion about form-driven websites, state management, and overall site design.

Prerequisites

This course is suitable for experienced web developers with a good grasp of HTML and general web
concepts.

Course Outline

Getting started

  • Background to PHP
  • Installation and configuration
  • Embedding PHP tags
  • Adding comments
  • Using the Print function

PHP scripting

  • Using variables
  • Dynamic variables
  • Data types
  • Defining arrays
  • Associative arrays
  • Manipulating arrays
  • Operators and expressions
  • If statements
  • Switch statements
  • The While statement
  • The For statement
  • Defining functions
  • Passing arguments

Working with forms

  • Forms overview
  • Capturing user input
  • Get and Post differences
  • Working with global variables
  • Handling file uploads

Accessing databases

  • Establishing a connection
  • Setting up queries
  • Using SQL commands
  • Displaying results
  • Adding records
  • Modifying records
  • Deleting records

State management

  • Overview of strategies
  • Using hidden fields
  • Creating query strings
  • Reading and setting cookies
  • Setting expiry dates
  • Deleting cookies
  • Overview of session functions
  • Using session variables
  • Tracking the session ID

Manipulating data

  • Formatting strings
  • Manipulating strings
  • Searching strings
  • Regular expression functions
  • Replacing patterns in strings
  • Splitting strings
  • Formatting dates
  • Converting data types

Errors and debugging

  • Overview of PHP errors
  • Logging errors
  • Typical scripting errors
  • Debugging strategies
  • Using Print statements
  • The Debug function