/PHP-Email-Form

A simple example of an email form. Perhaps you've seen this on some personal websites where the owner provides a method to quickly get in touch with them.

Primary LanguagePHP

PHP - Email-Form

A simple example of an email form. Perhaps you've seen this on some personal websites where the owner provides a method to quickly get in touch with them.

The index_email.php file is where the actual html form exists.

The contactform.php file houses the php code used to send an email.

WARNING: Be sure to change the value of the $to variable on line 10 in the contactform.php file. That is the address that the email will be sent to.

These two files must be used in a hosted environment that supports PHP.



Example in action



In this example, the submit button was pressed before entering all of the details which displays error messages at all empty fields