.
Developer Spot - Web Development Tutorials
arrowDeverloper Spot  Tutorials  PHP  Email Forms In PHP, The Easiest Yet... 
 
Development Tutorials
ASP
CGI & Perl
CSS
HTML
Java
JavaScript
Linux
PHP
XML




More Resources
Web Hosting Articles
Web Development News
PHP Manual
Web Hosting Directory
Budget Web Hosting Linux Web Hosting Small Business Hosting
Windows Web Hosting Reseller Web Hosting Web Hosting Articles

Email Forms In PHP, The Easiest Yet...

By Dan Ball
2003-09-27
Bookmark Print Version
The Form

Like any email form, the original form itself is quite simple. No great shakes here, just a standard HTML form with a POST method and the action pointing to the PHP page that will process the form results.

<form name="form" method="post" action="contact_thanks.php">

<p class="bodymd">Your Name<br>

<input type="text" name="Name">

</p>

<p class="bodymd">Your Email<br>

<input type="text" name="Email">

</p>

<p class="bodymd">Comments or Questions<br>

<textarea name="Comments" rows="5" cols="40"></textarea>

</p>

<p class="bodymd">

<input type="submit" name="Submit" value="Submit">

<input type="reset" name="Reset" value="Clear Form">

</p>

</form>

This form can be .html, .shtml or whatever you choose, the page that the results are handed to, however, must be a PHP page.


Article Pages:
PHP Email Form Introduction
Barebones PHP Basics
The Form
Processing The Mail
Compiling And Sending The Email
Final Thoughts

 Rate this article:   Poor          Excellent 


If you found this article interesting, you may want to read these as well:

» Protecting your PHP and HTML Source Code

» Publishing Newsletters Using PHP & MySQL - 4

» Publishing Newsletters Using PHP & MySQL - 3

» Publishing Newsletter Using PHP & MySQL - 2

» Publishing Newsletters Using PHP & MySQL

» Unix Webserver Crontab Basics



 
Development Tutorials: CGI & Perl - CSS - HTML - Java - JavaScript - Linux - PHP - XML
More Resources: Web Hosting Articles - Web Development News - PHP Manual