Search
Recommended Sites
Related Links






   

Informative Articles

Build Websites Easier With Premade Templates
To most people the process of building a web site remains somewhat of a mystery. This confusion probably stems from the fact that there is a cornucopia of web sites on the Internet. Even with wide variety of sites, every single one can be divided...

How to Make Money Even When Visitors Leave Your Site
orry to have to tell you this but not everybody who comes to your site is going to like it. No matter how much you put into designing it, no matter how good your content is, there's someone out there who's just not gonna dig it. Personalities...

How to Set up Your Own Personal Website, without Spending Any Money
It has been my dream, right from childhood, to establish a great site, without spending any money. So I searched the web, for free domain names, free web hosting and free websites. I would like to share the results of my search with you. I have...

Web design with a difference.
Anybody looking for a web designer is spoilt for choice. Type in web design in Google and you will come up with millions of websites offering web design around the world. The web design industry is indeed extremely competitive. So how do we go...

Website Basics
The Basics You have a flourishing business – everything is in its place. You just miss one important piece of marketing: an Internet Presence a website. Like everything in business, getting a website needs planning. Getting an effective website...

 
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.