PHP and MySQL® 24-Hour Trainer

Book description

Step-by-step lessons for using PHP and MySQL in a unique book-and-video combination

Assuming no previous experience with PHP or MySQL, this book-and-video package is ideal reading for anyone who wants to go beyond HTML/CSS in order to provide clients with the most dynamic web sites possible. The approachable tone breaks down the basics of programming and PHP and MySQL in individual lessons starting with the installation of the programs necessary to run PHP. You begin with a static web site and then watch and learn as PHP functionality is added as you work through the lessons.

When working with databases, the MySQL database is introduced with demonstrations that show how to interact with it. The accompanying videos enhance your learning experience, as each lesson in the book is portrayed in the video exercises.

Lessons include:

  • Getting started with PHP

  • Setting up your workspace

  • Adding PHP to a web page

  • Learning PHP syntax

  • Working with variables

  • Debugging code

  • Working with complex data

  • Making decisions

  • Repeating program steps

  • Learning about scope

  • Reusing code with functions

  • Creating forms

  • Introducing object-oriented programming

  • Defining classes

  • Using classes

  • Using advanced techniques

  • Handling errors

  • Writing secure code

  • Introducing databases

  • Introducing MySQL

  • Creating and connecting to the

  • Creating tables

  • Entering data

  • Selecting data

  • Using multiple tables

  • Changing data

  • Deleting data

  • Preventing database security issues

  • Creating user logins

  • Turn the case study into a content management system

Note: As part of the print version of this title, video lessons are included on DVD. For e-book versions, video lessons can be accessed at wrox.com using a link provided in the interior of the e-book.

Table of contents

  1. Cover
  2. Introduction
  3. Section I: Getting Started with PHP
    1. Lesson 1: Setting Up Your Workspace
      1. Installing XAMPP
      2. Installing Your Editor
      3. Configuring Your Workspace
    2. Lesson 2: Adding PHP to a Web Page
      1. Writing Your First PHP Page
      2. Introducing the Case Study
      3. Using echo and include
    3. Lesson 3: Learning PHP Syntax
      1. Picking a Formatting Style
      2. Learning PHP Syntax
      3. Entering Comments
      4. Using Best Practices
    4. Lesson 4: Working with Variables
      1. Introduction to Variables
      2. Working with Text
      3. Understanding Different Types of Numbers
      4. Working with Numbers
      5. Changing between Text and Numbers
    5. Lesson 5: Debugging Code
      1. Troubleshooting Techniques
      2. Using Xdebug
    6. Lesson 6: Working with Complex Data
      1. Working with Arrays
      2. Working with Logical Variables
      3. Working with Constants
      4. Working with Dates
      5. Working with Built-in Functions
      6. Working with Objects
  4. Section II: Working with PHP Controls, Functions, and Forms
    1. Lesson 7: Making Decisions
      1. If/Else
      2. Logical Operators
      3. Switch Statements
      4. Alternative Syntax
    2. Lesson 8: Repeating Program Steps
      1. While Loops
      2. Do/While Loops
      3. For Loops
      4. Foreach Loops
      5. Continue/Break
    3. Lesson 9: Learning about Scope
      1. Learning about Local Variables
      2. Learning about Global Variables
    4. Lesson 10: Reusing Code with Functions
      1. Defining Functions
      2. Passing Parameters
      3. Getting Values from Functions
      4. Using Functions
      5. Including Other Files
    5. Lesson 11: Creating Forms
      1. Setting Up Forms
      2. Processing Forms
      3. Redirecting with Headers
  5. Section III: Objects and Classes
    1. Lesson 12: Introducing Object-Oriented Programming
      1. Understanding the Reasons for Using OOP
      2. Introducing OOP Concepts
      3. Learning Variations in Different PHP Releases
    2. Lesson 13: Defining Classes
      1. Defining Class Variables (Properties)
      2. Defining Class Functions (Methods)
    3. Lesson 14: Using Classes
      1. Instantiating the Class
      2. Using Objects
    4. Lesson 15: Using Advanced Techniques
      1. Initializing the Class
      2. Understanding Scope
      3. Understanding Inheritance
      4. Understanding Static Methods and Properties
  6. Section IV: Preventing Problems
    1. Lesson 16: Handling Errors
      1. Testing for Errors
      2. Using Try/Catch
    2. Lesson 17: Writing Secure Code
      1. Understanding Common Threats
      2. Using Proper Coding Techniques
  7. Section V: Using a Database
    1. Lesson 18: Introducing Databases
      1. What Is a Database?
      2. Gathering Information to Define Your Database
      3. Designing Your Tables
      4. Setting Up Relationships between Tables
      5. Instituting the Business Rules
      6. Normalizing the Tables
    2. Lesson 19: Introducing MySQL
      1. Using phpMyAdmin
      2. Learning the Syntax
    3. Lesson 20: Creating and Connecting to the Database
      1. Connecting with mysql/mysqli
      2. Connecting with PDO
      3. Creating the Database
    4. Lesson 21: Creating Tables
      1. Understanding Data Types
      2. Using AUTO_INCREMENT
      3. Understanding Defaults
      4. Creating Tables in phpMyAdmin
      5. Using .sql Script Files
      6. Adding MySQL Tables to PHP
    5. Lesson 22: Entering Data
      1. Understanding the INSERT Command
      2. Executing MySQL Commands in PHP
      3. Processing Data Entry Forms in PHP
    6. Lesson 23: Selecting Data
      1. Using the SELECT Command
      2. Using WHERE
      3. Selecting Data in PHP
    7. Lesson 24: Using Multiple Tables
      1. Using the JOIN Clause
      2. Using Subqueries
    8. Lesson 25: Changing Data
      1. Using the UPDATE Command
      2. Updating Data in PHP
      3. Using Prepared Statements
    9. Lesson 26: Deleting Data
      1. Using the DELETE Command
      2. Deleting Data in PHP
    10. Lesson 27: Preventing Database Security Issues
      1. Understanding Security Issues
      2. Using Best Practices
      3. Filtering Data
  8. Section VI: Putting It All Together
    1. Lesson 28: Creating User Logins
      1. Understanding Access Control
      2. Protecting Passwords
      3. Using Cookies and Sessions
      4. Putting Logins to Work
    2. Lesson 29: Turn the Case Study into a Content Management System
      1. Designing and Creating the Table
      2. Creating the Class
      3. Creating the Maintenance Pages
      4. Creating the Display Page
    3. Lesson 30: Creating a Dynamic Menu
      1. Setting up the Menu Table
      2. Adding the Menu to the Website
    4. Lesson 31: Next Steps

Product information

  • Title: PHP and MySQL® 24-Hour Trainer
  • Author(s): Andrea Tarr
  • Release date: November 2011
  • Publisher(s): Wrox
  • ISBN: 9781118066881