PHP Form to Email Script


So you want to send emails via an online (HTML) contact form?  It’s pretty simple.
In our example, we will be using two files – one to gather the input through an HTML form and another to send the email.  We will call these two files form.php and process.php respectively.
form.php – is the HTML form where a user can input his name, email, subject, and message
process.php – is the PHP script that will send the email to you.  So let’s proceed.
First we create your form – form.php:


You may insert the above code in any HTML page that you want but for our example we will call our html page “form.php”
Next, we create the email sending script which we will call “process.php” and put the following code in it:


Now, upload these two files on your server and give it a try.  Enjoy.  If you have questions, feel free to post them below.



March 22, 2006 · Posted in Technology  
    

Comments

One Response to “PHP Form to Email Script”

  1. Ronald on March 22nd, 2006 11:17 am

    mail form

Leave a Reply

Start a Franchising Business in the Philippines