spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / php / phpemail current pageTo page 2To page 3To page 4
[next]

Email Forms in PHP

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management
By ( Dan Ball )

I recently admitted to myself that my home business should be moved off of the "free hosting" service I have had it on for about 3 years. Though the service was great, and it was very feature-rich as compared to any other free service I have seen, it is still subject to invasive maneuvers by the company itself. That said, I moved to a pay service. The immediate thrill was no banner code to add to my pages. The underlying benefit was their support of PHP (PHP Hypertext Preprocessor) pages and hosting a MySQL database. I knew when I signed up that they supported that; what I didn't know was how great that combination was, and how powerful PHP really is.

With this "rebirth" I have found in Web development with my introduction to PHP I have decided to dedicate a little bit of my time and a few pages to PHP and how easy it is to setup a very cool email feedback form with it. I have used various tools in the past to build forms and database connectivity, such as ASP, JSP and CGI/Perl. PHP, without a doubt, has been the most enjoyable to work with yet, with its familiar scripting syntax and predictable results.

Barebones PHP basics

A couple very basic concepts of PHP must be discussed before getting into this project further. First, PHP code is inserted into pages inside <?php and ?> tags. Second, any page that contains any amount of those tags should have the .php or .php3 extension. The .php3 extension is for pages that are using features that were new to version 3 of PHP. Check with your system administrator for any rules regarding which extension you need to use and the tags you need to enclose the code, because PHP is also designed to be custom configured to fit the way you are comfortable coding. It can be configured to use the ASP <% %> tags amongst other customizations that are beyond the scope of this article.

The PHP pages still contain a lot of typical HTML, so your pages will still need the typical <html>, <body>, etc. they just may not be right at the top like you are used to seeing because there may be PHP variables and such being defined before the <html> tag. Also, like JSP and ASP, if you do a view source at the client level, you will only see the HTML and client-side scripting, because by that time all the PHP has been read and processed by the server and the resulting HTML is fed to the browser.

With all that being understood, let's get on with the fun stuff.

home / programming / php / phpemail current pageTo page 2To page 3To page 4
[next]

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Review: Lenovo ThinkPad SL300 · OCZ PC3-10666 Gold 2x1GB Review · Apple Recommends Antivirus for Macs


Created: July 30, 2001
Revised: July 30, 2001


URL: http://webreference.com/programming/javascript/phpemail/