AI Features
Log In
0% completed
All Lessons
Free Lessons (5)
Getting Started
Who Is This Course For?
Learning Outcomes
Serving Resources
Serving an HTML File with the Built-In Web Server
Adding a Favicon
Security Announcement
Communication between the Browser and the Server
Quiz on PHP Web
Serving PHP Scripts
Dynamic Resources
The Response: Status, Headers, and Body
Constructing a Response
Linking to Other Pages
Passing Values between Requests
Security Announcement
Quiz on PHP Scripts
Forms
Submitting Form Data as Query Parameters
Security Announcement
Adding a Select Element to the Form
Submitting Data via the Request Body: POST Requests
Submitting Data via the Request Body: Reviving Functionality
Quiz on Forms
Cookies
Purpose of Using Cookies
Setting a Cookie
Using a Cookie
Cookies Are Headers
Redirecting after Processing a POST Request
Security Announcement
Challenge: Showing "Congratulations!"
Solution: Showing "Congratulations!"
Quiz on Cookies
Sessions
Using Sessions for Storing User Data
Session Files and Serialized Data
Flash Messages
Using Flash Messages Everywhere
Quiz on Sessions
Authentication
Authenticating Users
A Secret Page
Setting Up a Login Form
Process of Verifying Users
Validating the Username and the Password with PHP
Logging out
Quiz on Authentication
PHP Project Structure
Header and Footer Snippets
Passing Variables to Snippets
Flash Messages Revisited
Bootstrapping
From .html to .php
Adding Navigation
Adding a Stylesheet
Routing: Mapping URLs
Routing: Displaying the Not Found Error
Project Challenge: Create a Task Management Application
Project Solution: Create a Task Management Application
Quiz on Project Structure
CRUD Part 1: Create
Saving JSON-Encoded Data in a File
Adding a Tour
Form Validation
Showing the Submitted Data in the Form
Listing Tours
Project Challenge: Create and List Tasks
Project Solution: Create and List Tasks
Quiz on CRUD Part 1
CRUD Part 2: The Rest
Identifying Tours to Edit
Introducing Some Reusable Elements
Editing Tour Data
Deleting Tours: Implementing Soft-Deletion
Deleting Tours: Challenges of Soft-Deletion
Project Challenge: Edit and Delete Tasks
Project Solution: Edit and Delete Tasks
Quiz on CRUD Part 2
File Uploads
Adding a Details Page
Uploading a File
Processing the File Upload
Showing the Uploaded Picture
Replacing the Existing Image
Form Validation for File Uploads
Quiz on File Uploads
Error Handling
Producing an Error
Using Different Configuration Settings in Production
Displaying an Error Page
PHP Errors
Quiz on Error Handling
Automated Testing
Setting Up the Environment
A First Test
Creating Our First Browser Test
A Test for The Pictures Page
Writing Tests for the Tours: Create a New Tour
Writing Tests for the Tours: Edit a Tour
Troubleshooting and Suggestions
Project Challenge: Create Tests
Project Challenge: Solution
Quiz on Automated Testing
Conclusion
It's a Wrap!
Home
Courses
PHP for the Web: Learn PHP without a Framework
Writing Tests for the Tours: Edit a Tour
Let's test the edit tour functionality.
We'll cover the following...
Adding a test for editing an existing tour
Adding a test for editing an existing
...