Search
Recommended Sites
Related Links






Valid XHTML 1.0 Transitional

Valid CSS!
   

Informative Articles

Content is KING
Give your visitors what they want, a theme-Based CONTENT Site. The latest research suggests that visitors will expect to find a keyword rich reference in the first 12 seconds of visiting your site. Do you need content to add to your web site? Or...

Encrypt HTML - HTML Encryption - HIDE SOURCE CODE
PLEASE VISIT WWW.HTMLBLOCK.CO.UK FOR HTML ENCRYPTION AND ANONYMOUS EMAIL SERVICE! Welcome to htmlblock.co.uk Protecting Websites Worldwide Protect your website with htmlblock.co.uk. Our software package gives you the highest in encryption and...

The DRC Blew It
The DRC (Disability Rights Commission) recently announced the results of their year-long investigation into the accessibility of 1000 websites. The DRC's report ( http://www.drc-gb.org/publicationsandreports/2.pdf ) concluded that most websites...

Web Page Optimisation
Web Page Optimisation Web Page Optimisation is a technique of attracting "search engine visibility" to particular Keywords within that page. How is this achieved? Firstly there are guidelines within every search engines rules that...

Website Theft - Part 2 of 3 ~ How do I know if my website material has been stolen and what do I do if it has?
(Please note that some of the information included in this article has been quoted from various locations while other information is simply my personal opinion and you will probably feel my passion in my words.) In the first instalment in our...

 
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.