PHP

A Contact Form with PHP

 


 

Introduction

In this video, we’re going to create “Contact Form” with PHP!
Every website has a contact form, but you may have no idea how it works.

Actually, the structure is very simple.
Get input values, validate them, and send an email. That’s it!
 

As always, I’ll show you every step in the video.

You will learn:

  • HTML & CSS
    • Bootstrap & Google Fonts
  • PHP
    • POST method
    • mail function
    • Validation

 

Hope you enjoy coding!
 

Memo

You may not be able to use mail function on localhost. If it doesn’t work, upload a PHP file to your web server.

 

Environment

MAMP / PHP version 7.1.19
Text Editor Coda2
Browser Google Chrome

 
 

Video

【PHP】How to Develop a Contact Form with Validation

 
 

Sample Code

 

ABOUT ME
Sara
Working as a freelance programmer in Japan. I try to make coding as simple as possible. Hope you enjoy coding 🙂