Free Course Image PHP

Free online coursePHP

Duration of the online course: 6 hours and 7 minutes

3.5

StarStarStarHalf star

(2)

Build dynamic websites with this free PHP course: learn forms, arrays, loops, functions and MySQL basics, plus practical projects to boost your web dev skills.

In this free course, learn about

  • Why PHP remains useful for web development and common reasons to learn it
  • Set up a local PHP environment (e.g., XAMPP) and organize projects under htdocs
  • Write basic PHP syntax: tags, variables, naming rules, echoing values, booleans
  • Work with strings: interpolation basics and string concatenation
  • Apply operator precedence (BIDMAS) in PHP expressions
  • Use arrays: indexed, associative, multidimensional; access and loop through them
  • Control flow: for loops, conditionals, and break/continue behavior
  • Define and call functions; understand scope and what makes a variable global
  • Reuse code with include vs require and understand their error behavior
  • Handle HTML forms: GET vs POST, validation, email validation, and errors arrays
  • Protect against XSS via output escaping/sanitization techniques
  • Use MySQL from PHP: connect to DB, run queries, and sort results with ORDER BY
  • Use query strings to link to detail pages and retrieve identifiers from the URL
  • Use superglobals, null coalescing (??), and basic file checks/read functions

Course Description

Unlock the skills to build real, dynamic websites with PHP, one of the most widely used server-side languages on the web. In this free online course, you will go from setting up a local development environment to writing clean, maintainable PHP that powers interactive pages, processes user input and communicates with a database. Whether you are starting your web development journey or adding backend skills to your toolkit, PHP remains a practical choice thanks to its broad hosting support, mature ecosystem and strong connection to everyday website features.

You will learn the core building blocks that make applications work behind the scenes: variables, data types and expressions, string handling and concatenation, arrays (including multi-dimensional structures), loops, and conditional logic. As you progress, you will start organizing code with functions, understand scope and global variables, and handle common patterns that show up in professional projects. The course also focuses on how pages can be assembled reliably using include and require, helping you keep layouts and reusable components consistent across a site.

Working with user-facing features is a key part of backend development, so you will practice processing web forms with GET and POST, handling superglobals, and validating inputs in a way that improves both usability and security. You will see how to store and display helpful error messages, validate fields like email addresses, and reduce risk from common threats such as cross-site scripting by sanitizing and escaping data properly. Along the way, you will also use practical syntax options that make templates and nested logic easier to read and maintain.

To connect your application to persistent data, you will be introduced to relational databases and the role of MySQL in typical PHP stacks. You will learn how PHP files communicate with a database, how a connection is established, and how to retrieve and sort records for display. You will also explore common web development techniques such as using query strings to show detail pages, handling default values with the null coalescing operator, and working with the filesystem by checking whether files exist and reading their contents when needed.

By the end, you will be able to create interactive pages that accept input, validate it, display dynamic results, and use data from a database to power simple applications. This course is designed to help you build confidence with backend fundamentals while reinforcing the habits that make code safer and easier to grow as your projects become more ambitious.

Course content

  • Video class: PHP Tutorial ( 07m
  • Exercise: _What are some reasons why learning PHP is still worthwhile for developers?
  • Exercise: _Why is PHP still a worthwhile language to learn for web developers?
  • Video class: PHP Tutorial ( 09m
  • Exercise: What software is suggested for setting up a local PHP development environment?
  • Video class: PHP Tutorial ( 07m
  • Exercise: _What is the purpose of creating a folder inside 'htdocs' in PHP development?
  • Exercise: _What is the correct way to embed PHP code inside PHP tags in Sublime editor?
  • Video class: PHP Tutorial ( 07m
  • Exercise: What is a valid rule for naming variables in PHP?
  • Video class: PHP Tutorial ( 11m
  • Exercise: _What is string concatenation in PHP?
  • Exercise: _What is string concatenation in PHP?
  • Video class: PHP Tutorial ( 09m
  • Exercise: What is the outcome of the expression 2 * (4 + 9) / 3 according to BIDMAS?
  • Video class: PHP Tutorial ( 16m
  • Exercise: _What are the three types of arrays in PHP?
  • Exercise: _What are the three types of arrays in PHP?
  • Video class: PHP Tutorial ( 10m
  • Exercise: What is a multi-dimensional array?
  • Video class: PHP Tutorial ( 19m
  • Exercise: _What is a for loop in PHP?
  • Exercise: _What is the purpose of loops in PHP?
  • Video class: PHP Tutorial ( 12m
  • Exercise: In PHP, how does a boolean value display when echoed to a browser?
  • Video class: PHP Tutorial ( 12m
  • Exercise: _What is a conditional statement in programming?
  • Exercise: _What is a conditional statement in programming?
  • Video class: PHP Tutorial ( 03m
  • Exercise: What do the 'break' and 'continue' keywords do in PHP loops?
  • Video class: PHP Tutorial ( 12m
  • Exercise: _What are functions in PHP?
  • Exercise: _What are functions in PHP?
  • Video class: PHP Tutorial ( 08m
  • Exercise: What is the main characteristic of a global variable?
  • Video class: PHP Tutorial ( 05m
  • Exercise: _What is the difference between include and require in PHP?
  • Exercise: _What is the difference between include and require in PHP?
  • Video class: PHP Tutorial ( 11m
  • Exercise: What CSS library is used in the Ninja Pizza project?
  • Video class: PHP Tutorial ( 16m
  • Exercise: _What are the two methods of sending data to the server via a web form in PHP?
  • Exercise: _What are the two methods of sending data to the server via a web form in PHP?
  • Video class: PHP Tutorial ( 04m
  • Exercise: How can you protect a website from cross-site scripting attacks?
  • Video class: PHP Tutorial ( 05m
  • Exercise: _What is form validation in PHP?
  • Exercise: _What is the purpose of form validation in PHP?
  • Video class: PHP Tutorial ( 13m
  • Exercise: What is used to validate an email in PHP according to the script?
  • Video class: PHP Tutorial ( 10m
  • Exercise: _What does the author do to store the error messages and output them in the form?
  • Exercise: _What is the purpose of creating an errors array in the PHP code?
  • Video class: PHP Tutorial ( 05m
  • Video class: PHP Tutorial ( 05m
  • Exercise: _What is a relational database management system?
  • Exercise: _What is MySQL and how do we communicate with it from PHP files?
  • Video class: PHP Tutorial ( 07m
  • Video class: PHP Tutorial ( 05m
  • Exercise: _What is the method used to connect to the database in PHP?
  • Video class: PHP Tutorial ( 07m
  • Video class: PHP Tutorial ( 08m
  • Exercise: _What keyword is used to order the data in a specific way in PHP and how can we order it by a specific column or property?
  • Exercise: _What keyword is used to order the data in a specific way in MySQL and what is the name of the property that the author orders the data by in the given text?
  • Video class: PHP Tutorial ( 06m
  • Video class: PHP Tutorial ( 04m
  • Exercise: _What is the alternative syntax that can be used to make it easier to keep track of curly braces when using nested loops and conditional statements in PHP?
  • Exercise: _What is the alternative syntax that can be used instead of curly braces for loops and conditional statements in PHP?
  • Video class: PHP Tutorial ( 10m
  • Video class: PHP Tutorial ( 13m
  • Exercise: _What is the purpose of using a query string in the URL when linking to the details page for a pizza in the tutorial?
  • Exercise: _What is the purpose of the query string in the URL when clicking on the "more info" button for a pizza?
  • Video class: PHP Tutorial ( 09m
  • Video class: PHP Tutorial ( 03m
  • Exercise: _What does the author want to do in the lesson?
  • Video class: PHP Tutorial ( 05m
  • Video class: PHP Tutorial ( 05m
  • Exercise: _What are superglobals in PHP?
  • Exercise: _What are superglobals in PHP?
  • Video class: PHP Tutorial ( 09m
  • Video class: PHP Tutorial ( 03m
  • Exercise: _What is the purpose of using the null coalesce operator in PHP?
  • Exercise: _What is the purpose of using the null coalesce operator in PHP?
  • Video class: PHP Tutorial ( 05m
  • Video class: PHP Tutorial ( 06m
  • Exercise: _What is the function used to check if a file exists in PHP?
  • Exercise: _What function can we use to read the contents of a file in PHP?
  • Video class: PHP Tutorial ( 08m
  • Video class: PHP Tutorial ( 11m
  • Video class: PHP Tutorial ( 08m

This free course includes:

6 hours and 7 minutes of online video course

Digital certificate of course completion (Free)

Exercises to train your knowledge

100% free, from content to certificate

Ready to get started?Download the app and get started today.

Install the app now

to access the course
Icon representing technology and business courses

Over 5,000 free courses

Programming, English, Digital Marketing and much more! Learn whatever you want, for free.

Calendar icon with target representing study planning

Study plan with AI

Our app's Artificial Intelligence can create a study schedule for the course you choose.

Professional icon representing career and business

From zero to professional success

Improve your resume with our free Certificate and then use our Artificial Intelligence to find your dream job.

You can also use the QR Code or the links below.

QR Code - Download Cursa - Online Courses

More free courses at Web Development

Free Ebook + Audiobooks! Learn by listening or reading!

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate