PHP Notebooks is a curated learning repository for readers who want a clean path from PHP fundamentals to practical web-development topics such as validation, sessions, file handling, database integration, MVC, AJAX, and JSON.
The repository is built around seven PDF handbooks and two companion projects. Each handbook focuses on one stage of the learning journey, and the repository now includes a GitHub Pages site, automated repository validation, and contributor guidance so the material is easier to browse, publish, and maintain.
Live site: https://un5m28r5mqztgtkjtzccy0nm1euvaeknxz28c.julianrbryant.com/PHP-Notebooks/
- Seven topic-focused PDF notebooks that form a progressive PHP learning path.
- Two GitHub projects that connect the theory to working codebases.
- A GitHub Pages website for browsing the collection visually.
- GitHub Actions workflows for repository validation and site deployment.
- Contribution and security guidance for long-term maintenance.
| Path | Purpose |
|---|---|
| README.md | Complete repository guide and learning map |
| index.html | GitHub Pages landing page |
| styles.css | Visual design for the site |
| script.js | Notebook catalog rendering and filtering |
| .github/workflows/python-ci.yml | Repository quality checks |
| .github/workflows/deploy-pages.yml | GitHub Pages deployment workflow |
| scripts/validate_repository.py | Validation logic used by CI |
| CONTRIBUTING.md | Contribution workflow |
| SECURITY.md | Security reporting guidance |
| Part | Notebook | Primary Focus | Best For |
|---|---|---|---|
| 1 | Introduction to PHP | Language basics, syntax, control flow, OOP, files | First-time PHP learners |
| 2 | HackProof: PHP Form Validation | Secure form handling, sanitization, XSS prevention | Readers building safe input flows |
| 3 | PHP Session and Cookie | State management, authentication patterns, persistence | Readers building login or session-based apps |
| 4 | Data Access Using PHP | Files, XML, reusable includes, uploads | Readers working with data beyond databases |
| 5 | PHP and MySQL Introduction | Database connectivity, CRUD, prepared statements | Readers moving into data-driven applications |
| 6 | PHP MVC Handbook | MVC architecture, separation of concerns, mini project | Readers learning project structure |
| 7 | AJAX and JSON | Async requests, APIs, response handling, JSON workflows | Readers building more interactive apps |
This notebook establishes the core language model and gives a beginner enough context to read and write small PHP programs confidently.
Topics covered:
- What PHP is and where it fits in web development.
- Installing PHP with XAMPP.
- Writing the first script and understanding syntax rules.
- Variables, data types, output functions, conditions, and loops.
- Functions, classes, objects, constructors, and methods.
- File handling, modularization with include and require, and basic exception handling.
Why it matters: This notebook is the foundation for everything else in the repository. If a reader skips it, later notebooks will feel disconnected.
This notebook focuses on one of the most important practical skills in backend development: never trusting user input.
Topics covered:
- Form handling basics and the difference between GET and POST.
- Why validation matters for integrity, security, and user experience.
- Server-side validation patterns using PHP and OOP.
- XSS prevention through sanitization and safe output encoding.
- How client-side validation can be bypassed.
- PHP filter functions and common sanitization helpers.
Why it matters: Readers who plan to build login forms, registration flows, checkout forms, or any data-entry feature should treat this notebook as required reading.
This notebook explains how PHP applications preserve state across requests.
Topics covered:
- Why HTTP is stateless.
- Creating, reading, and deleting cookies.
- Detecting cookie support.
- Starting, updating, and destroying PHP sessions.
- Login, dashboard, and logout workflow design.
- Deciding when cookies are appropriate and when sessions are safer.
Why it matters: This material sits directly behind authentication systems, shopping carts, multi-step forms, and persistent preferences.
This notebook broadens the reader's view of data access beyond relational databases.
Topics covered:
- Reading and writing text files.
- File modes and safe write patterns.
- Loading and generating XML with SimpleXML.
- Building reusable code with include and require.
- Handling uploads with correct PHP configuration.
- Inspecting the $_FILES array and moving uploaded files safely.
Why it matters: Readers learn how PHP works with common file-based workflows and how to avoid basic upload mistakes.
This notebook introduces database-backed application development.
Topics covered:
- MySQL fundamentals and relational database concepts.
- Connecting PHP to MySQL with MySQLi and PDO.
- Creating databases and tables.
- Secure inserts with prepared statements.
- Transactions and multiple-record workflows.
- A practical product-management example.
- SQL injection prevention and production-safe error handling.
Why it matters: This is the bridge from static learning exercises to applications that persist real data.
This notebook introduces architectural thinking and a more maintainable way to organize PHP projects.
Topics covered:
- The purpose of MVC and the responsibilities of model, view, and controller.
- Advantages and tradeoffs of MVC.
- How popular PHP frameworks map to MVC ideas.
- A student-management mini-project with PDO, controllers, models, views, routing, SQL setup, and styling.
Why it matters: This notebook shifts the reader from isolated scripts to structured application design.
This notebook covers asynchronous browser-server communication and structured data exchange.
Topics covered:
- What AJAX is and how it works.
- The role of XMLHttpRequest.
- GET and POST requests.
- Response lifecycle, status codes, and response headers.
- JSON parsing and generation.
- Best practices for async requests and error handling.
Why it matters: Readers learn how to build web experiences that feel responsive rather than page-refresh driven.
This project is a strong practical companion to the validation, sessions, and database notebooks. It is most relevant for readers interested in authentication flows, financial-data handling, form safety, and real application structure.
This project is the clearest hands-on extension of the MVC notebook. It helps readers connect the design concepts to a working CRUD application with separation between routing, models, controllers, and views.
- Start with the PHP fundamentals notebook.
- Move into secure input handling and state management.
- Learn file-based data access before database-backed development.
- Add database work with MySQL.
- Study MVC once basic PHP and database ideas feel comfortable.
- Finish with AJAX and JSON to build richer frontend-backend interactions.
The repository includes a custom GitHub Pages site in index.html with styling in styles.css and catalog logic in script.js.
The site is designed to help visitors:
- See the full notebook collection quickly.
- Filter notebooks by topic area.
- Open PDF handbooks directly.
- Jump to related GitHub projects.
- Understand the learning path without reading the repository tree first.
The repository uses GitHub Actions to protect quality and publishing workflows.
- python-ci.yml validates that the core files, workflows, PDF assets, README coverage, and project links are present.
- deploy-pages.yml publishes the static site to GitHub Pages from the repository contents.
- Read this README once from top to bottom.
- Open the notebook that matches your current skill level.
- Use the GitHub Pages site if you want a faster visual overview.
- Explore the linked projects when you want to see the concepts applied in code.
If you want to improve summaries, fix broken links, refine the site, or expand the learning path, read CONTRIBUTING.md before opening a pull request.
If you notice an unsafe example, sensitive disclosure, or a misleading security recommendation, report it through the process in SECURITY.md.