Search
Recommended Sites
Related Links






   

Informative Articles

Converting Print Advertising For Use On The Web - A How-To
Contrary to the beliefs of some, advertising for web and print are very different. Converting print ads for use on the web is very tricky. What has been very successful on paper may have no impact at all on the screen. When I am asked "How do I...

cPanel Fantastico - Features and Benefits
Fantastico is a 3rd-party cPanel add-on and can be purchased and added to the standard cPanel interface. Fantastico allows you to quickly install a variety of open-source scripts. By selecting a script and providing some basic information for...

Designing your website
'First impression lasts' is very much true for online business. Website content (texts, graphics and animations) must create a 3D picture of product/service in the mind of the consumers, and entice them to buy it. Content can make a business...

The Power of Topical Search Engines
What are Topical Search Engines? Simply put, topical search engines are search engines focused on a specific industry, sector or topic. While many marketers are scrambling for links, any links, an area that is often overlooked is...

Top 10 Web Design Mistakes
As a webmaster, you want to keep your visitors content so they'll come back again. Below you will find ten common mistakes made by webmasters that may deter people from returning. 1) Poor Color Choice There's one important thing to keep in mind...

 
How to make a simple form mailer with PHP

As you may be well aware, displaying your e-mail address on your website can lead to e-mail harvesters picking up your address and adding it to hundreds or even thousands of lists used by spammers. If you want to allow your website visitors to contact you, but do not want to publicly display your e-mail address, then a form mailer may be exactly what you are looking for.

What is a form mailer? Quite simply, it is a form that you place on your website, that when filled in and submitted, sends you an e-mail with the contents. Below is an example of a simple form mailer written in PHP - feel free to change the information to that of your own website and make use of it:

[WRITE YOUR HTML HEADER HERE]

<?php

if ($_POST[t] == 'process'){

mail('webmaster@yoursite.tld','Your Site Contact Form Submission',stripslashes($_POST[message]),'FROM:'.$_POST[email]);

echo'<p>Thank you, your message was sent to the webmaster.</p>'."\n";

} else {

echo'<form action="'.$_SERVER[PHP_SELF].'" method="post">'."\n";
echo'<input type="hidden" name="t" value="process"></input>'."\n";

echo'Your E-Mail Address:<br /><input type="text" name="email" size="30" value=""></input><br /><br />'."\n";

echo'Your Message:<br /><textarea name="message" cols="30" rows="8"></textarea><br /><br />'."\n";

echo'<input type="submit" value="Send E-Mail"></input>'."\n";
echo'</form>';

}

?>

[WRITE YOUR HTML FOOTER HERE]

To clarify, copy and paste everything from [WRITE YOUR HTML HEADER HERE] to [WRITE YOUR HTML FOOTER HERE] into a text editor such as Notepad. Make your desired alterations. Save as a file with a .php extension (such as contact.php). Upload to your server and link to the file.

About the author:
Rupe Parnell is the founder and lead developer at Starsol.co.uk, a website development and management firm located in Norfolk, England. Rupe specialises in creating professional grade PHP scripts, a selection of which are available free at http://www.starsol.co.uk/scripts/



Sign up for PayPal and start accepting credit card payments instantly.