It is a common requirement to have a form on almost any web site. In this article, we will create a PHP script that will send an email when a webform is submitted. There are two parts to the webform: The HTML form code for the form. The HTML code below displays a standard form in the web browser. If you are new to HTML coding, please see: HTML form tutorial The PHP script for handling the form submission.