Free online course PHP for Beginners: Learn PHP, MySQL and Login Systems
Duration of the online course: 10 hours and 49 minutes
New
Build dynamic websites fast: learn PHP, MySQL, and secure login systems in a free online course with hands-on practice and job-ready skills.
In this free course, learn about
How to set up a local PHP dev server (e.g., Apache + MySQL) and run PHP locally
PHP core syntax: tags, semicolons, and why omitting the closing ?> is recommended in pure PHP files
Variables and data types: declaring/initializing strings and other common types in PHP
Using superglobals (e.g., $_GET, $_POST, $_SERVER) and safe form-handling access checks
Operators and control flow: strict equality (===), if/elseif/else vs switch, and conditions
Validating/sanitizing user input (calculator exercise) to avoid trusting client-submitted data
Arrays (indexed vs associative) and key built-ins like explode() for splitting strings
Writing user-defined functions, benefits (reuse/clarity), and handling scope/global data safely
Constants and loops (especially foreach) for iterating arrays/results to output many rows
MySQL basics: databases, tables, primary keys/auto-increment IDs, and CRUD + JOINs (e.g., LEFT JOIN)
Connecting with PDO, using prepared statements, and safe UPDATEs with WHERE clauses
Output escaping to prevent XSS (e.g., htmlspecialchars) and session creation/security settings
Password hashing concepts plus signup/login flows: password_verify(), MVC roles for DB query functions
OOP fundamentals in PHP, including visibility modifiers like protected for parent/child access
About the free online course
Want to move beyond static pages and start building real web applications? This free online course helps you learn PHP from the ground up, then connects those fundamentals to practical development with MySQL and modern login flows. You will go from understanding the language basics to creating pages that respond to user input, store data reliably, and protect accounts with sessions and password hashing.
You will start by setting up a local development environment so you can work like a real developer and test everything safely on your own machine. From there, you will get comfortable with core PHP concepts such as syntax, variables and data types, operators, conditions, loops, arrays, built-in functions, and writing your own reusable functions. These building blocks matter because they are what turn a simple script into maintainable, readable code you can grow into larger projects.
As you progress, you will bridge PHP with databases using MySQL, learning how and why websites persist information, how tables are structured, and how to add, update, and retrieve records for typical web scenarios. You will also learn to connect securely using PDO and to handle form data responsibly by validating input and using prepared statements to reduce the risk of SQL injection.
Account features are a core focus, because they show up in almost every serious website. You will work with sessions, understand important session security settings, and implement authentication essentials such as signup and login behavior using password hashing and verification. You will also touch on organizing code in a cleaner, MVC-style way and get an introduction to object-oriented PHP so you can understand how larger codebases are structured.
By the end, you will be better prepared to build database-driven websites, create safer user experiences, and take on junior web development tasks with more confidence, whether you are learning for a portfolio, freelance work, or the next step toward a developer role.
Course content
Video class: 1 | Introduction to PHP Programming for Beginners | 2023 | Learn PHP Full Course for Beginners10m
Exercise: Which set of three categories is used to structure learning PHP in this course?
Video class: 2 | How to Install a Local Server for PHP | 2023 | Learn PHP Full Course for Beginners10m
Exercise: Which two services should be started in the control panel to run PHP and use a database locally?
Video class: 3 | Learn About PHP Syntax for Beginners | 2023 | Learn PHP Full Course for Beginners07m
Exercise: In a file that contains only PHP code, what is the recommended practice regarding the closing PHP tag?
Video class: 4 | PHP Variable and Data Type Tutorial | 2023 | Learn PHP Full Course for Beginners17m
Exercise: In PHP, how do you declare and initialize a variable containing a text value?
Video class: 5 | Built-In Superglobal Variables in PHP | 2023 | Learn PHP Full Course for Beginners15m
Exercise: Which statement best describes PHP superglobals (predefined variables)?
Video class: 6 | The Basics of PHP Form Handling Tutorial | 2023 | Learn PHP Full Course for Beginners23m
Exercise: When handling an HTML form submission in PHP, what is the recommended way to ensure the formhandler script was accessed correctly?
Video class: 7 | The PHP Operators You Need to Know! | 2023 | Learn PHP Full Course for Beginners23m
Exercise: In PHP, which operator checks whether two values are equal AND of the same data type?
Video class: 8 | Conditions19m
Exercise: What is a key difference between a PHP switch statement and an if/elseif/else chain?
Video class: 9 | PHP Exercise for Beginners: Create a Calculator! | 2023 | Learn PHP Full Course for Beginners32m
Exercise: When handling calculator form input in PHP, which approach is recommended to prevent trusting user input too much?
Video class: 10 | How to Create Arrays in PHP | Indexed22m
Exercise: In PHP, what is an associative array mainly used for compared to a regular indexed array?
Video class: 11 | Internal (Built-in) Functions in PHP | 2023 | Learn PHP Full Course for Beginners20m
Exercise: In PHP, which built-in function can you use to split a string into an array using a delimiter (such as a space)?
Video class: 12 | User-Defined Functions in PHP for Beginners | 2023 | Learn PHP Full Course for Beginners14m
Exercise: What is a main benefit of using user-defined functions in PHP?
Video class: 13 | Scopes in PHP for Beginners | 2023 | Learn PHP Full Course for Beginners13m
Exercise: In PHP, what is the recommended way to use a global variable value inside a function?
Video class: 14 | What are Constants in PHP for Beginners | 2023 | Learn PHP Full Course for Beginners06m
Exercise: Which statement best describes a constant in PHP?
Video class: 15 | How to Use and Create Loops in PHP | 2023 | Learn PHP Full Course for Beginners17m
Exercise: In PHP, which loop is especially important for outputting multiple rows of data (e.g., from a database) because it iterates through arrays automatically?
Video class: 16 | Create a Database in MySQL PHP Tutorial | 2023 | Learn PHP Full Course for Beginners12m
Exercise: What is the main purpose of using a database in a PHP website?
Video class: 17 | Create Database Tables in MySQL PHP Tutorial | 2023 | Learn PHP Full Course for Beginners40m
Exercise: When creating a table for users, what is the main purpose of setting an ID column as INT(11) NOT NULL AUTO_INCREMENT and then making it the PRIMARY KEY?
Video class: 18 | INSERT, UPDATE19m
Exercise: When inserting a new comment, why must the users_id value match an existing user?
Video class: 19 | SELECT12m
Exercise: Which SQL join will return all users even if they have no matching comment, showing NULL for the missing comment data?
Video class: 20 | Connect to a Database From a Website Using PHP | 2023 | Learn PHP Full Course for Beginners14m
Exercise: Which line is the essential code that actually creates the database connection when using PDO in PHP?
Video class: 21 | Change Username05m
Exercise: In phpMyAdmin, what is the recommended way to change the password for the database user used to connect (e.g., root@localhost)?
Video class: 22 | INSERT INTO Database Using PHP From Your Website! | 2023 | Learn PHP Full Course for Beginners22m
Exercise: Why are prepared statements recommended when inserting form data into a MySQL database using PDO?
Video class: 23 | UPDATE08m
Exercise: When updating a user with an SQL UPDATE statement, what clause prevents updating every row in the table?
Video class: 24 | Selecting Data Using PHP From Your Website! | 2023 | Learn PHP Full Course For Beginners22m
Exercise: When outputting database search results in PHP, which function is used to help prevent cross-site scripting (XSS)?
Video class: 25 | How to Create Sessions in PHP for Beginners | 2023 | Learn PHP Full Course For Beginners12m
Exercise: Which PHP function must be called to start a session so session variables can be used across pages?
Video class: 26 | Session Security Basics in PHP for Beginners | 2023 | Learn PHP Full Course For Beginners16m
Exercise: Which setting helps prevent session fixation by ensuring the session ID is only passed via cookies (not through the URL)?
Video class: 27 | Hashing Using PHP for Beginners | 2023 | Learn PHP Full Course For Beginners22m
Video class: 28 | Let's Create A Signup System in PHP! | 2023 | Learn PHP Full Course for Beginners1h19m
Exercise: In an MVC-style structure for a PHP signup system, which file should contain the functions that directly query the database (SELECT/INSERT)?
Video class: 29 | Let's Create A Login System in PHP! | 2023 | Learn PHP Full Course for Beginners45m
Exercise: In a basic PHP login system, what is the purpose of using password_verify() during login?
Video class: Learn Object Oriented PHP for Beginners | With Examples to Help You Understand! | OOP PHP Tutorial58m
Exercise: In PHP OOP, which visibility modifier allows a class and its child classes (but not unrelated classes) to access a property or method?