Search
Recommended Sites
Related Links






Valid XHTML 1.0 Transitional

Valid CSS!
   

Informative Articles

5 Things Which Make Your Site Sticky
Your site's stickiness is its ability to retain visitors and bring them back again later. Here I point out 5 great sites which offer a free service to make your site sticky: 1. Moreover - http://w.moreover.com/ - Add stickiness to your site by...

Building the Website of Your Dreams Not Your NightMares
In 1999, when I set out to build my first website I knew very little about html and even less about planning websites. Like a lot of Newbies I just struggled along learning as I went. I also knew very little about running a home business on the...

Dynamic pages
Dynamic pages Dynamic pages and the Search Engines By Clare Lawrence 10th March 2003 Clare is the CEO of Discount Domains Ltd a leading UK Domain name registration service. Do search engines such as Google penalise dynamic pages? Dynamic pages...

Taking Your Website Mobile
You might have tested your website on every computer browser you can find, but nowadays that's just not enough. Nowadays the web is getting more and more mobile - it's being used on mobile phones, PDAs, and all sorts of other small devices that...

Web Site Design: How To Get Around
Our web site (Internet Tips and Secrets - http://www.internet- tips.net/ ) runs an awards program which gets as many as fifty submissions a week. That means we visit each of those fifty sites each and every week to determine if they measure up to...

 
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.