Developing Web Applications with PHP &MySQL

Duration: 5Days

Overview

PHP is a widely used programming language which works on the principal of server side scripting to produce dynamic Web pages. It can be easily integrated with HTML and SQL to produce these dynamic web pages, and is often used to process the contents of a Web page form as it is more secure and reliable than JavaScript. You will learn how PHP can be combined with MySQL to create a very powerful online database engine. This PHP programming course will be of great interest to IT and Web development professionals who would like to learn more about using PHP and MySQL to integrate database functions into Websites, and to learners who would like to learn more about the functionality of PHP and MySQL.
The three days, practical, exercise-driven course will cover the fundamentals of using MySQL and PHP and will provide a firm grounding in each technology and explore how they allow you to build sophisticated, bespoke web applications.

Prerequisites

• HTML
• CSS
• Fundamentals Programming Skills

Course Outline

Introduction

  • Why use PHP and MySQL?
  • The PHP programming environment
  • Overview of SQL

 

Setting Up a Test Server

 

  • Decisions about a testing environment
  • WAMP/MAMP
  • Installing Apache, PHP and MySQL on your computer
  • Testing on a remote Server
  • Deciding on Development tools
  • Using PHPMyAdmin

 

Overview of PHP

 

  • Setting up a PHP page
  • The phpinfo() function
  • Learning basic syntax
  • Echoing HTML output to the browser
  • The importance of comments
  • Using single and double quotes

 

Variables in PHP

 

  • Using loose typed variables
  • Assigning variables
  • Overview of numeric, string and other types
  • Assigning a variable to itself

 

Logical Operators

 

  • Arithmetic operators
  • Logical operators
  • Comparisons
  • Operator precedence

 

Numbers in PHP

 

  • Making calculations
  • Using built-in numeric functions
  • Incrementing and decrementing

 

Strings in PHP

 

  • Concatenating strings
  • Trimming strings
  • Removing slashes and other harmful characters
  • String functions

 

Control structures in PHP

 

  • The If statement
  • FOR loops
  • While loops
  • The Switch

 

Transferring information between PHP pages

 

  • GET and POST
  • Different form field types
  • Self-referencing forms
  • Form handlers

 

Database fundamentals

 

  • Structuring a database
  • Using tables
  • Table relationships
  • Common data types

 

Creating a database

 

  • Using PHPmyAdmin
  • Adding a table
  • Populating a table with types and data
  • Browsing a table with SQL

 

Getting PHP to connect to MySQL

 

  • PHP5 and MySQL5 security features
  • Using mysqli_connect()
  • Testing a connnection
  • Mysqli and prepared statements
  • Using a positional placeholder
  • Writing a sample error trap

 

Querying MySQL using PHP

 

  • Writing SQL queries
  • Using Select, Insert, Update and Delete
  • Querying MySQL and returning results
  • Interpreting the returned array

 

Building a Web Application

 

  • Manipulating dynamic pages:
    • Add entries
    • Modify entries
    • List entries
    • Filter entries
    • PHP and XML

 

Security features

  • Validating entries