Beginner Projects
Prerequisites: Level 1 — Beginner
Build these with nothing but what Level 1 covered — variables, arrays, functions, superglobals, and sessions.
1. Command-Line Calculator
Read two numbers and an operator from $argv (command-line arguments),
then print the result. Handle division by zero with a friendly message.
2. Contact Form Handler
Build an HTML form (name, email, message) that POSTs to a PHP
script. Validate each field isn't empty, then display a formatted
confirmation — no database needed yet.
3. Session-Based To-Do List
Store an array of tasks in $_SESSION['tasks']. Build a page with a form
to add a task and a list showing all current tasks, persisting across
page reloads.
4. File-Based Guestbook
Append each submitted message (with file_put_contents(..., FILE_APPEND))
to a text file, then read and display every entry on the same page.
5. Simple Quiz App
Store 5 questions and answers in an associative array. Use a form to submit all answers at once, then compare and print a score out of 5.