How To Build a PHP Contact Form

The definitive guide to PHP

Hi friends,

Welcome to the definitive guide to php course.

PHP is a fantastic language, and, in this course, I want to show you how to get started by creating a working, production ready contact form.

I will take a very practical approach by building out the contact form from scratch, but at the same time implement some complex concepts like variables, loops and storing the data in a MySQL database and then using that information to create an email which will then send off the information through a mail server to my inbox.

This course is ideal if you wanted to get into programming but got stuck along the way. Either because every time you work through a tutorial you fail to see how it fits together in the bigger scheme, or because you just never got to understand how you would apply variables and loops in the real world.

That is the aim, I want to show you how this all translates back to the real world and hopefully spark that aha moment in your journey.

All the video courses are accompanied by in-depth articles on this website where the full source code is available with additional commentary.

Without further ado, lets get coding!

PHP Course Overview

We will be building a working PHP contact form using phpmailer, mysql, boostrap and the PDO driver.

Click here to watch the tutorial trailer.

How to build a contact form - Part 1 Logo

Building a PHP contact form - Part 1

In this tutorial I will show you how to build a production ready and secure PHP contact form with the ability to send an email to you when it is filled in.

Click here for the part 1 article and PHP source code.

How to build a contact form - Part 2 Logo

Building a PHP contact form - Part 2

In part 2 we will be adding the phpMailer library to our contact form to use an external email server to handle the emails.

Click here for the part 2 article and PHP source code.

How to build a contact form - Part 3 Logo

Building a PHP contact form - Part 3

Part 3 of the building a PHP contact form from scratch series is where we will introduce PDO and MySQL to our contact form to store the requests for later use.

Click here for the part 3 article and PHP source code.

How to build a contact form - Part 4 Logo

Some articles you might also be interested in...

How to monitor the power usage of devices using a Sonoff Pow R2
How to monitor the power usage of devices using a Sonoff Pow R2

Sonoff Pow R2 is a 16A WiFi smart light switch that allows you to remotely manage and control your appliances and monitor your home energy usage. The WiFi light switch works like a power monitor, which allows you to keep track of 99% accurate real-time current, voltage and power on your app.

Read The Article
A Beginner’s guide on how to browse the dark web with TOR
A Beginner’s guide on how to browse the dark web with TOR

First thing to understand is that on the hidden web, you do not know about a website unless that website is shared with you. The dark web’s content on the internet isn’t accessible through traditional browsers or standard browsing technology. Content on the dark web is designed to be hidden from search engines and from casual users – you can’t simply stumble across dark web websites by accident.

Read The Article
A smart bulb that works with the eWelink app
A smart bulb that works with the eWelink app

The Sonoff lightbulbs are very affordable and provide you with the basic functionality that a smart home needs. If the budget is tight and you don’t need all bells and whistles of the more expensive lights, Sonoff lightbulbs will do the job just fine. The prices start from $9.90 for the (plastic, White + color temperature) B02 B A60 and $12.90 for the fancy, pear-shaped B02-F-ST64 (glass, retro look, White + color temperature). As far as connected lights go, the prices are very attractive and Sonoff lightbulbs indeed are as inexpensive as you can get.

Read The Article