Learn PHP from Scratch
Learn server-side programming with PHP: syntax, functions, arrays, forms, sessions and MySQL with PDO, including the security practices every PHP developer must know.
What you will learn
- Write and run PHP scripts
- Handle forms and validate input safely
- Build login systems with sessions
- Create, read, update and delete data with PDO
Course syllabus
- Introduction to PHP: Setup and Your First ScriptLearn what PHP is, how to set up a local server with XAMPP or the built-in server, and write and…
- PHP Variables, Data Types and OperatorsLearn PHP variables, data types, string handling, constants and operators, with examples of type juggling and string interpolation.
- PHP Conditions and LoopsLearn PHP if/else, switch, match, for, while and foreach loops with examples, and how to control loops with break and…
- PHP Functions and ArraysLearn PHP functions with parameters and return types, indexed and associative arrays, multidimensional arrays and useful array functions.
- Handling Forms in PHP: GET, POST and ValidationLearn how PHP receives form data with $_GET and $_POST, validate and sanitise input, and protect output with htmlspecialchars.
- PHP Sessions and CookiesLearn how PHP sessions and cookies work, build a simple login flow, and follow secure session practices such as regenerating…
- PHP and MySQL with PDO: CRUD and SecurityConnect PHP to MySQL using PDO, run create, read, update and delete queries with prepared statements, and prevent SQL injection.