
Already know some of this? A 2-minute test skips the lessons you know.
Take the placement testA free 24-lesson course built from Bro Code's 4h 00m of YouTube video. 3 days at 90 minutes a day, with study notes and a quiz in every lesson. A 2-minute placement test skips what you already know.
Taught by Bro Code on YouTube. Videos play in YouTube's own player, so the creator keeps every view.
Download, install, and configure the XAMPP web server stack and the Visual Studio Code editor for PHP development.
Create an index.php file in the htdocs folder, configure the PHP executable path in VS Code, install recommended extensions, and run a basic echo statement via localhost.
Declare variables with the $ sigil, work with strings, integers, floats, and booleans, and combine variables in output and calculations.
Use arithmetic operators (+, -, *, /, **, %), increment/decrement operators, and apply correct operator precedence in complex expressions.
Collect form data using $_GET and $_POST, understand their security differences, and build a simple login form that switches from GET to POST.
Apply abs(), round(), floor(), ceil(), pow(), sqrt(), max(), min(), pi(), and rand() in a form that calculates order totals.
Write if/else/elseif statements, compare values with comparison operators, and use logical operators (&&, ||, !) for complex conditions.
Replace long elseif chains with switch/case/break/default for cleaner multi-way branching on a single value.
Construct for loops with initialization, condition, and increment/decrement to repeat code a known number of times, including counting up and down.
Use while loops for indefinite repetition based on a condition, and understand when to prefer while over for.
Create indexed arrays, access elements by index, iterate with foreach, and manipulate arrays with array_push, array_pop, array_shift, array_unshift, array_reverse, and count.
Create key-value pairs, access values by key, iterate with foreach, and use array_keys, array_values, array_flip, array_reverse, and count on associative arrays.
Sanitize and validate user input with filter_input() using FILTER_SANITIZE_SPECIAL_CHARS, FILTER_VALIDATE_INT, FILTER_VALIDATE_EMAIL, and check emptiness with empty().
Group radio buttons with a shared name attribute, read the selected value via $_POST, guard against undefined keys, and process the selection with a switch statement.
Create multiple checkboxes with the same name[] to submit an array, detect checked boxes with isset() or empty(), and loop through the submitted array with foreach.
Define reusable functions with parameters, invoke them with arguments, return values, and apply them in examples like happy birthday and hypotenuse calculation.
Manipulate strings with strtolower, strtoupper, trim, str_pad, str_replace, strrev, str_shuffle, strcmp, strlen, strpos, substr, explode, and implode.
Create cookies with setcookie() using name, value, expiration (time()+seconds), and path; read the $_COOKIE superglobal; update and delete cookies by setting past expiration.
Start sessions with session_start(), store user credentials in $_SESSION, access them across pages, and destroy the session on logout with session_destroy() and header redirect.
Inspect $_SERVER key-value pairs, use PHP_SELF for self-referencing forms (with htmlspecialchars filter), and detect request method (GET/POST) for reliable form handling.
Create a reusable database.php with mysqli_connect, check connection success, wrap in try/catch for mysqli_sql_exception, and include it in other scripts.
Use phpMyAdmin to create a database and a users table with columns id (PK, AI), username (unique), password, and registration_date (timestamp default).
Build a registration form with POST, sanitize inputs, validate non-empty fields, hash passwords with password_hash, insert via mysqli_query, and catch duplicate-entry exceptions.
Execute SELECT queries with mysqli_query, fetch one row with mysqli_fetch_assoc, or loop through multiple rows with a while loop and mysqli_fetch_assoc.