Search
Recommended Sites
Related Links






Valid XHTML 1.0 Transitional

Valid CSS!
   

Informative Articles

From Concept to Website
You've decided to create a website to market your products or services. More and more people start their information searches online, so having a website is the logical next step. But without web development skills or knowledge, how do you build...

Printing and Sending: the Two Things Users Want to Do
There's something you have to realise about the way users interact with articles. To put it simply, they don't just want to read them: they also want to print them out, and send them on to their friends, family and colleagues. If you can make...

Selecting the Best Web Design Language for Your Project
If you'd like to create and publish your own web site on the Internet, your first step should be to decide what type of web site you would like to create and what web design language you would like to use. Although there are several web design...

Teach yourself CSS the easy way
I taught myself HTML back in the mid-nineties and was proud of the fact that I was able to accomplish the design of fairly complex web pages with nothing more than a starter HTML book, an HTML reference book, and the knowledge I had stored in my...

The 3 Musts for Running Your Web Design Business Efficiently and Effectively
There is no shortage of Web sites and books on how to create graphics for Web sites and how to use HTML or programming software. However, in order to run a Web design business efficiently and effectively you need to know a whole lot more than just...

 
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.