spacer

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

home / programming / php_forms2 / 1 To page 1To page 2current pageTo page 4
[previous] [next]

Senior Web Analytics Engineer
Professional Technical Resources
US-OR-Beaverton

Justtechjobs.com Post A Job | Post A Resume
Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source

How to Interact with Web Forms.. Part 2

Writing All Form Data into a File

After a user fills out a form correctly, what do you do with the form data? A very intuitive approach that does not require too much setup on the server is to write the data into a file on the server.

The preceding code contains a very naďve approach: All data is stored in a file on the server.When the form is submitted, the file is read in and unserialized into an array.Then, the form data is appended to the array. Finally, the array is serialized again and written back to the file.

Figure 4.3 shows this file in a text editor.

Sending All Form Data Via Email

A more imminent notification of someone filling out a form can be implemented by sending form data via email. Of course, you can write a custom mail script for each and every form; however, the preceding code shows how this can be done universally.Via for, all form data is merged into a string. Special care is taken of form values that are arrays—this can occur with multiple selection lists.Then the form data is mailed to the webmaster—just don’t forget to change the email address.

home / programming / php_forms2 / 1 To page 1To page 2current pageTo page 4
[previous] [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 >
Working with the DOM Stylesheets Collection · Administering RBAC in PHP 5 CMS Framework · xref: Automatic Cross Referencing Script
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Combine BottomCount() with Other MDX Functions to Add Sophistication · Creating a Daemon with Python · The Coming Voice-over-WiMAX Revolution

Created: March 27, 2003
Revised: January 23, 2006

URL: http://webreference.com/programming/php_forms2/1