# PHP & MySQL Bootcamp

Canonical URL: <https://www.creativelive.com/classes/php>

## Overview

If you are comfortable building static web pages but ready to make them actually do something, this course on PHP and MySQL is your next step. The training gives you a solid foundational understanding of these two core building blocks of dynamic websites, covering everything you need to start adding real back-end functionality to your projects. You will learn how to work with forms, sanitize user input for security, send emails, work with cookies, and handle file uploads.

On the database side, you will interact with MySQL using SQL to fetch, insert, update, delete, and search records. You will also learn how to use phpMyAdmin to create databases and tables, and get comfortable with data typing and indexes along the way. By the end, you will have the foundational skills to build websites that go well beyond static pages.

## What you'll learn

- Use PHP to bring websites to life, turning static HTML into a two-way, user-interactive experience
- Get an introduction to the basics of PHP and MySQL
- Understand how PHP & MySQL can be used to handle form submissions, interact with databases, and more
- Gain a solid foundation of how PHP works, including working with forms, sessions, and more
- Learn the basics of MySQL, using SQL to fetch, insert, update, delete, and search records

## Prerequisites

Students should feel comfortable coding HTML and CSS. You should have knowledge equivalent to our [Web Development Level 2](/classes/web-development-level2) class.

Please note that to run a local server on each machine we use XAMPP (Free) for the PC and MAMP Pro ($69) for the Mac.

## Curriculum

### Section 1

#### Basic PHP Syntax

- Echo, Strings, and Variables
- Single Quotes vs. Double Quotes
- Escaping Characters
- Heredoc
- Concatenation
- Comments

#### Working with Numbers

- Arithmetic Operators
- Assignment Operators
- Table of Arithmetic Operators
- Table of Assignment Operators
- Defining a Site and Testing Server in Dreamweaver

#### Conditionals

- If/Else
- Elseif
- Switch
- Comparison Operators
- Logical Operators
- The Difference Between == and ===

### Section 2

#### Arrays

- Creating a simple array
- Using array()
- Multidimensional Arrays
- Printing an Entire Array Using print\_r()

#### Loops

- While Loops
- Do…While
- For Loops
- ForEach
- Break Out of Loop
- Continue

#### Working with Strings

- Comparing Strings
- Converting to Upper and Lower Case
- Searching Through Strings
- Case-Sensitive and Case-Insensitive

### Section 3

#### Form Basics and Security

- Post vs. Get
- Radios, Checkboxes, and Select Fields
- Magic Quotes
- Securing the page
- Using Functions

#### Sending Email

- Setting Up MAMP Pro
- Setting Up XAMPP and Mercury Mail
- Sending a Test Email

#### Simple Form Validation and Email

- Sanitizing Input
- Error Checking
- Displaying Errors
- Sending Email
- Adding a Thank You Page
- Including Files

### Section 4

#### Cookies

- Adding Cookies
- Tracking the Number of Visits
- Sending an Email with the Cookie Info

#### Sessions

- Starting a Session
- Using Session Variables
- Log In/Log Out
- Destroying Session Variables

#### File Uploads

- Making a File Upload Form
- The $\_FILES Array
- Uploading Files
- Basic Security

### Section 5

#### Creating a Database/MySQL/SELECT

- Creating a New Database
- Connecting to the Database
- SQL Basics
- The SELECT Statement
- Display the Number of Rows Returned
- Making a Reusable Connection Script
- MySQL vs. MySQLi vs. PDO

#### Making a Reusable Connection Script

- Error Checking
- Making an Include
- Sorting Results

#### Prepared Statements

- Selecting and Filtering Results
- Preventing SQL Injection Attacks with Prepared Statements

### Section 6

#### SQL: Insert

- The INSERT Statement
- Using phpMyAdmin
- Inserting Information from a Form

#### SQL: Update

- The UPDATE Statement
- Update Form
- Display Data in the Update Form
- Display Checkboxes
- Hidden Fields

#### SQL: Delete

- The DELETE Statement
- Deleting Rows from a Database
- Passing ID Variables in a URL

#### SQL: Search

- Wildcard Searches
- Searching with a Form

## FAQ

### Do I need to bring anything to the class?


No. We provide computers (Mac or PC) with the required software installed. Choose your operating system at checkout.

## Pricing

**Tuition:** $975
