Sending E-mail With PHP

Every web site has email.  Rather it being a feedback form of some sort or a mailto: tag, why make it hard for the visitor to contact you?  When you can take 3 lines of code and create a feedback form the directly sends it to your email from the webbrowser witth the visitors input.

Creating a PHP Email form could be the best thing that has ever happened to your site.  So how do you do it? Easy.
You can have any one of your pages send an email when the visitor either visits the page or if the visitor has submitted some sort of input.  When you add the code it needs to be at the top of the page you would like to send from.

Now lets create a feedback from from scratch using HTML and PHP.
Create the following page with the following code.

Now  that we have created the feedback form with HTML, we are going to creat the PHP code the actully sends the email to the user.
Create a new PHP page named sendmail.php and enter the following code on that page.

When a users access feedback.php and enters the email information and click submit the page will be redirected to sendmail.php wich performs the send mail script.  Brought to you buy TECHSOFTCENTER.COM.