Getting Started with PHP and MySQL

3 Day Course
Hands On
Code QAPHP

Book Now - 1 Delivery Method Available:

Scheduled Online Onsite

Overview

As the connected world becomes more integrated, companies are attempting to extend the reach of their applications to encompass clients directly. The use of LAMP (Linux, Apache, MySQL, PHP) applications has enabled developers to leverage the power of open source to develop these applications.

This course covers the use of PHP to create web-based solutions that can deliver powerful, real-world applications power over an intranet, extranet or the Internet.

The course also introduces MySQL, and shows how it can be used with PHP to create, query, and update data in a relational database.

Objectives

On Completion, Delegates will be able to:

  • Use PHP to create a useful website
  • Use and declare variables, constants and operators in PHP
  • Maintain state in PHP web applications using cookies and sessions
  • Use regular expressions to handle text
  • Access company data held in MySQL using PHP.

Training Partners

We work with the following best of breed training partners using our bulk buying power to bring you a wider range of dates, locations and prices.

Modules

Hide all

Getting Started (8 topics)

  • Getting Started with PHP and MySQL
  • Overview of PHP
  • Documentation
  • PHP setup parameters
  • PHP and database access
  • Basic syntax of a PHP script
  • Running a PHP script
  • Running PHP as a server side script

PHP Language basics (17 topics)

  • PHP basic syntax
  • PHP variables
  • Output in PHP
  • PHP constants
  • Fundamental if statement
  • PHP functions
  • PHP data types
  • Getting and setting data type
  • The is_type functions
  • Type casting
  • Empty or set?
  • Common operators
  • Arithmetic expressions
  • Compound assignments
  • Increment and decrement operators
  • String operators
  • Basic OOP

Lists and Arrays (10 topics)

  • Arrays
  • Indexed arrays
  • Assigning to a list
  • Array to scalar: join
  • Scalar to array: explode
  • Associative arrays
  • Miscellaneous array functions
  • The in_array function
  • The array_search function
  • Arrays of arrays

PHP in HTML (14 topics)

  • Web application development
  • Server-side processing
  • Server-side processing and PHP
  • Processing forms - GET
  • Creating a link
  • Processing forms - POST
  • A trick with arrays
  • GET or POST?
  • Uploading files (POST)
  • Uploading files (POST)
  • Downloading files
  • State and persistence
  • State management: Cookies
  • State management: Sessions

Decision Making (15 topics)

  • The full if statement
  • The elseif clause
  • In-line conditional operator
  • PHP logical operators
  • PHP comparison operators
  • The switch-case statement
  • The while loop
  • The do-while loop
  • The for loop
  • Iterating through an indexed array
  • The foreach loop
  • Iterating through an associative array
  • The break statement
  • The continue statement
  • The die (or exit) construct

String Handling (15 topics)

  • Strings are like arrays?
  • String-related functions
  • String handling: strlen
  • String formatting: printf
  • String handling: substr
  • String manipulation: str_replace
  • Comparison operators (reminder)
  • Comparing strings
  • Regular Expressions in PHP
  • PHP Regular Expressions functions
  • PHP Regular Expression patterns
  • Finding strings: pereg_match
  • Replacing strings: pereg_replace
  • Grouping and back-references
  • Splitting strings: pereg_split

Writing Functions (14 topics)

  • User-defined functions
  • Function parameters
  • Assigning default values to parameters
  • Returning values from a function
  • PHP code from external files
  • Variable scope
  • Superglobal and Global scope
  • Local scope
  • Static scope
  • Error handling in PHP
  • Routing error messages
  • Specifying which errors to report
  • Setting error reporting using php.ini
  • Doing your own error handling

Introducing MySQL (25 topics)

  • What is MySQL?
  • MySQL versions
  • MySQL GUI tools
  • MySQL administrator
  • MySQL variables and options
  • MySQL Query Browser
  • MySQL command line tool: mysql
  • Executing SQL from a file
  • Creating databases and tables
  • Using keys
  • Table types in MySQL
  • Basic SQL types
  • Other SQL types
  • Date and time types
  • Deleting databases and tables
  • Inserting data
  • Retrieving data
  • Updating and deleting data
  • MySQL user access control
  • MySQL user accounts
  • Assigning privileges
  • Concurrency control
  • Locking
  • Transaction control with InnoDB
  • MySQL documentation

Integrating PHP and MySQL (11 topics)

  • PHP interfaces with MySQL
  • Connecting to MySQL
  • Connecting to a database
  • Executing SQL
  • Retrieving the data set
  • Refining the fetch
  • Other mysql functions
  • MySQL Improved Extension
  • MySQLi functions
  • MySQLi placeholders
  • MySQLi statement functions

Security Overview (14 topics)

  • Basics of web security
  • Vulnerabilities of web applications
  • Vulnerabilities of authentication
  • Password security
  • SQL injection
  • Avoiding SQL injection
  • Query string injection
  • Cross-site scripting (XSS)
  • Avoiding XSS
  • Cookie vulnerability
  • Hidden field vulnerability
  • Sniffing attacks
  • Replay attacks
  • More information

Prerequisites

Delegates should have a good grounding in HTML and its fundamental constructs, although an HTML refresher is available. This could be a result of at least 6 months hands-on Web development experienceor possibly less if preceded by appropriate training, such as one of our Web programming courses. Alternatively, delegates without this HTML experience should consider attending our “Building an Effective Website” (NEWEBDE-5) for equivalent HTML knowledge. An awareness of database technology, in particular the use of SQL queries would be advantageous.

Additional Learning

The courses below may help you meet the knowledge level required to take this course. If you are unsure please ask a training advisor .

  • Building an Effective Website

    This 5-day training course illustrates the technologies and tools available for Building an Effective Website best suited to your environment

    5 Day Course Hands On Training Course Code NEWEBDE6
    Scheduled Online Onsite

or call:408-759-5074

Course PDF

Print

Share this Course

+1
Share

Recommend this Course

Sections