What you’ll learn
- How PHP runs on a server and turns code into the HTML a browser sees
- Variables, strings, conditions, loops, arrays and functions
- How to reuse a header and footer across every page
- The difference between GET and POST, and when to use each
- How to build, validate and secure a contact form
- How to send email from PHP and remember visitors with sessions
- How to connect to MySQL with PDO and save form data safely
Who this course is for
- Web designers who want working forms instead of “contact form plugins”
- WordPress users who want to understand theme files and edit them with confidence
- Front-end beginners who know HTML and CSS and want to add a back end
Before you start
Do I need to know HTML first?
Yes, the basics. PHP builds HTML pages, so you should be comfortable with tags, links and forms. The free HTML course on this site covers everything you need.
Is PHP still worth learning?
Yes. PHP runs WordPress, WooCommerce and a large share of the web. If you build or fix websites for clients, you will meet PHP all the time.
What do I need on my computer?
A code editor (VS Code) and a local server. The first lesson shows two free ways to run PHP on your own computer.
What will I build?
A small multi-page site with a shared header and footer, and a contact form that validates input, sends you an email and saves every message to a MySQL database.