PHP Foundations: From Zero to Dynamic Web Developer

StreetGeek Academy · Web Development Track

🎓 PHP Foundations: From Zero to Dynamic Web Developer

Level: Beginner  • 
Duration: ~10–12 hours

🎯 Course Goal

By the end of this course, students will understand PHP fundamentals, write and debug PHP scripts,
interact with MySQL databases, and build their first dynamic website or starter WordPress plugin.

🧩 Course Structure Overview

#ModuleDurationKey Deliverable
1Introduction to PHP45 minSetup environment & first PHP script
2PHP Syntax and Basics60 minUse variables, data types, and print output
3Operators and Expressions45 minCalculator logic practice
4Control Structures60 minNumber guessing mini-game
5Arrays & Superglobals60 minContact form using $_POST
6Functions60 minBMI calculator function
7Working with Forms60 minFeedback form with validation
8Working with Files45 minGuestbook using file storage
9PHP + MySQL90 minCRUD “Task List” project
10Sessions & Cookies75 minLogin system with session authentication
11Error Handling45 minException-based debugging demo
12Final Project2–3 hrsSimple Blog System
13Bonus: PHP in WordPress60 minSimple shortcode plugin

📘 Detailed Module Breakdown

MODULE 1: Introduction to PHP

Objective: Understand what PHP is, where it runs, and how to set up your local environment.

  • What PHP is and how it works
  • PHP vs. HTML vs. JavaScript
  • Server-side vs. client-side
  • The LAMP stack (Linux, Apache, MySQL, PHP)
  • Installing LocalWP / XAMPP / MAMP
  • Writing your first PHP script
  • How the server interprets .php files

Deliverable ✅ Run your first PHP script that outputs "Hello, StreetGeek!"

Assignment Create a folder named php-basics and save your first script as index.php.

Open Module 1 →

MODULE 2: PHP Syntax and Basic Concepts

Objective: Learn the building blocks of PHP syntax and data handling.

  • PHP tags and comments
  • Variables and data types
  • Constants and scope
  • String concatenation & interpolation
  • Debugging with var_dump()

Deliverable ✅ Create a PHP file that displays your name, age, and favorite programming language.

Assignment Use var_dump() to inspect different variable types.

Open Module 2 →

MODULE 3: Operators and Expressions

Objective: Understand how PHP handles arithmetic and logic.

  • Arithmetic and comparison operators
  • Logical operators (&&, ||, !)
  • Increment/Decrement
  • Operator precedence

Mini-Project ✅ Simple “Discount Calculator” script based on user input.

Assignment Calculate total purchase price after discount and tax using PHP.

Open Module 3 →

MODULE 4: Control Structures

Objective: Use logic to control the flow of your PHP scripts.

  • if, else, and elseif
  • switch
  • Loops (for, while, foreach)
  • break and continue

Mini-Project ✅ Number Guessing Game — randomly generate a number and give feedback until the user guesses correctly.

Open Module 4 →

MODULE 5: Arrays and Superglobals

Objective: Store multiple values and use PHP’s built-in global variables.

  • Indexed, associative, and multidimensional arrays
  • Sorting and merging arrays
  • PHP Superglobals: $_GET, $_POST, $_SERVER, $_COOKIE, $_SESSION

Mini-Project ✅ Create a contact form using $_POST and display the submitted data.

Assignment Experiment with $_SERVER['PHP_SELF'] and $_REQUEST.

Open Module 5 →

MODULE 6: Functions

Objective: Write reusable blocks of code.

  • Defining and calling functions
  • Parameters and return values
  • Default parameters
  • Scope and global variables
  • Built-in string and array functions

Mini-Project ✅ Create a BMI calculator function that returns the user’s category (Underweight, Normal, Overweight, etc.).

Open Module 6 →

MODULE 7: Working with Forms and User Input

Objective: Build interactive forms with validation.

  • Handling form input
  • Sanitization and validation
  • Error messages
  • filter_input() and htmlspecialchars()

Mini-Project ✅ Feedback form that validates email and text input, then displays a thank-you message.

Assignment Enhance your form to handle errors gracefully.

Open Module 7 →

MODULE 8: Working with Files

Objective: Read and write data from files using PHP.

  • Opening and closing files (fopen, fclose)
  • Reading and writing data
  • Checking file existence
  • File upload validation (intro)

Mini-Project ✅ Guestbook — allow users to submit comments that are stored in a text file.

Open Module 8 →

MODULE 9: PHP + MySQL Database Integration

Objective: Connect PHP to a MySQL database and build dynamic content.

  • Introduction to MySQL and phpMyAdmin
  • mysqli vs PDO
  • CRUD operations (SELECT, INSERT, UPDATE, DELETE)
  • Prepared statements (security against SQL injection)

Mini-Project ✅ Build a Task List app with database integration.

Assignment Add a “Mark as Complete” button to your Task List.

Open Module 9 →

MODULE 10: Sessions, Cookies, and Authentication

Objective: Manage user state and authentication flow.

  • Sessions vs Cookies
  • Setting and retrieving cookies
  • Logging in and out
  • Session management and logout flow

Mini-Project ✅ Create a login system using PHP sessions.

Assignment Add “Remember Me” using cookies.

Open Module 10 →

MODULE 11: Error Handling and Debugging

Objective: Learn to handle and log errors effectively.

  • Types of PHP errors
  • Using try, catch, and finally
  • Throwing exceptions
  • Logging errors
  • Using error_log()

Mini-Project ✅ Debug a broken script and create a custom error message handler.

Open Module 11 →

MODULE 12: Final Project – Simple Blog System

Objective: Combine all your skills to create a functioning PHP web app.

  • Homepage lists all posts
  • Add/Edit/Delete posts (CRUD)
  • Store posts in MySQL
  • User authentication for authors
  • Optional comments section

Deliverable ✅ Complete functional blog with database-backed posts.

Bonus Deploy to a live cPanel or StreetGeek VPS hosting account.

Open Module 12 →

MODULE 13: Bonus – Intro to PHP in WordPress

Objective: Bridge to WordPress development.

  • How WordPress uses PHP
  • The Loop and template hierarchy
  • functions.php overview
  • Hooks and shortcodes

Mini-Project ✅ Create a “Hello StreetGeek” plugin that adds a shortcode [streetgeek_hello].

Open Module 13 →

🧾 Course Materials

  • PDF lesson notes
  • Example scripts (.zip)
  • Mini-projects starter files
  • Practice exercises
  • Quizzes after each module
  • Final project template
  • Certificate of completion

🧱 Suggested Next Courses

  • WordPress Development Foundations
  • JavaScript for Beginners
  • PHP + MySQL Advanced (CRUD Apps)
  • Build Your First WordPress Plugin

🧑‍🏫 Instructor Notes (Internal)

  • Encourage students to use GitHub for version control.
  • Provide video lessons in 10–15 minute segments.
  • Include real-time code walkthroughs using LocalWP.
  • Promote engagement with “Try it Yourself” challenges.
  • End each module with a short recap and quiz.