43
326
HOUR 19:Getting Interactive with Forms
To process, or parse, the results from the form, the server that hosts the page has to
perform some actions. Unfortunately, several different server languages are avail-
able, and they are for the most part mutually exclusive. As a result, a function that
works perfectly on one server might generate only errors on another server. So,
before you start applying functionality to your forms, you have to find out what
language the hosting server speaks.
Most web servers run one of the two main server architectures: Linux Server or
Microsoft’s Windows Server. Both servers support a programming language called
PHP,whereas only Windows servers support the application framework called
ASP.NET. If you have a Windows server, there is a good chance it has FrontPage
Server extensions installed, but there is no guarantee. Therefore, it is imperative
that you find out what architecture the server you plan to put your page on is run-
ning and what languages and extensions it supports. If you follow the next tutorial
and upload the page to a Linux server or a Microsoft server without the FrontPage
Server extensions installed, the form will not work properly.
By the
Way
If you are hosting your page on a Linux server, you need to use PHP to create
the email form functionality. Hour 21, “Beyond the Basics, Part 1: PHP in
Expression Web 4,” talks about PHP and has a full tutorial on how to make the
email form work using this programming language.
Did you
Know?
▼
Try It Yourself
Send Form Results
Now that you have a basic form built in to your page, you need to connect it to the
functions that make it work. Provided your server has FrontPage Server extensions
installed, Expression Web 4 has built-in functions that make it easy to create forms
to send results directly to a predefined email address, file, or database.
1. Right-click anywhere inside the email form and select Form Properties from
the context menu. This opens the Form Properties dialog (see Figure 19.10).
2. Because you want the form to generate an email, select the Send To radio but-
ton at the top of the dialog.
3. In the Send To area, you have two options: You can enter a filename and you
can enter an email address. If you enter a filename, the results of the form
will be sent to a file stored on the server. The two options can be used sepa-
rately or together. Saving the results to a file and sending it to an email
address is an easy way to make sure the message doesn’t get lost.
▼
www.it-ebooks.info