[Previous] [Content Page] [Next]
Saving Form Results to a DatabaseIn the last tutorial, you learned how to create forms and send results to a text file or email message. Now that you know a bit about databases, you're ready to save form results to a database. Say you collect visitor information (name, address, and so on) in a form on your site. If you save these results to a database, there's a lot you can do with the data. For instance, you can use your database program to sort and analyze information about your visitors. When you figure out that all the people interested in your mosquito nets live near the Okefenokee swamp, you can step up your marketing in that location. Or take your data and export it from the database into Word, where you can use the mail merge feature to automatically generate personalized letters and envelopes. Before you know it, you've mailed out hundreds of letters without breaking a sweat. When you save results to a database, FrontPage gives you three options: you can save results to a new database that FrontPage creates for you, you can update a database that FrontPage previously created for you, or you can save results in an existing database. Note: To save results to a database, your Web server needs to be running both FrontPage Server Extensions 2002 (the latest version) and Active Server Pages Extensions. This feature won't work on a Web server with SharePoint Services installed. 16.3.1. Creating a New Database with FrontPageYou can turn any HTML form into a database, if you want. FrontPage can take your field names and generate an Access database to hold your visitor's entries. It's astoundingly easy. After you've created your form, do the following:
Note: Make sure your Web server supports Active Server Pages. Ask your host or Web site administrator. 16.3.2. Updating a DatabaseFrontPage has created a nifty little database for you, but what happens if you need to add or remove a form field? Will doing so mess up your database? NopeFrontPage is pretty flexible in this department. First, make whatever changes you want to your form. Then open Form Properties, click Options, and then click Update Database. FrontPage updates your database to match your form. Magic. 16.3.3. Saving Results to an Existing DatabaseWhat if you have an existing database that you want your form fields to feed into? FrontPage can help you out even though the program's fairly late (compared to its competitors) in providing this service. However, you'll have to help out with some tweaks here and there. Note: One major limitation when you save results to a database is that FrontPage can only save form data to one table per form. If your form has fields that feed into more than one of your database's tables, forget it. In that case, you'll need to save results to a text file or single table database and then import them into your existing database somehow. Or just create separate forms for each table.
|
[Previous] [Content Page] [Next]
