
It may be useful to manually enter and use a web server suffix entry other than ".fm". Perhaps the names of your databases have a different suffix (".fp3" for example), or you might prefer a suffix which better markets your online presence (".orders" for example). To do this, simply define a new web server suffix entry mapped to the WEB·FM action. If the name of the target database does not actually have the suffix used, WEB·FM will automatically strip the suffix from the file request.
Create a new Global field in your database named "WWW" and give it 20 repeating cells.
Upon every transaction WEB·FM will place 20 HTTP request parameters into the repeating cells. Using a script or calculation and the GetRepetition() function you can access a specific cell for the desired parameter and take action based upon that parameter. The first cell can normally be referred to by field name alone (WWW) without using the GetRepetition() function since it's the first repetition. The order in which repeating cell values get data is as follows:
| 1. | FormData | Submitted form data, or search argument portion of URL |
| 2 | Method | HTTP method (e.g. GET, POST) |
| 3 | Domain | Domain name of client |
| 4 | Username | Username for current authentication scheme |
| 5 | Password | Password for current authentication scheme |
| 6 | "From" header field (email address when supplied) | |
| 7 | ServerName | Domain name of server |
| 8 | ServerPort | Port number of server |
| 9 | URLPath | URLPath |
| 10 | Command | Database command (or Path argument portion of URL) |
| 11 | Referer | Refering document |
| 12 | Browser | |
| 13 | Realm | |
| 14 | SearchArg | |
| 15 | ClientIP | |
| 16 | FullRequest | |
| 17 | ||
| 18 | TotalConnections | |
| 19 | CurrentUserLevel | |
| 20 | HighestUserLevel |
Advanced uses might include sending a URL redirect to the client browser for sending an email message using another plug-in, or setting a browser "cookie" value for an online shopping cart complete with expiration dates.
Example:
HTTP/1.0 302 Found
Location: cookie.fm$Add?cookie=[cookie]&html=detail.html
Set-Cookie: CUSTOMER=WILE_E_COYOTE; path=/; expires=Tuesday, 31-Dec-96
23:12:40 GMT
Use a Content-Type field for better international character support in conjunction with the Encoder and Decoder Processors.
Use a Last-Modified field to force the client browser to locally cache database transactions. For example, you might create a small, simple database with the sole purpose of serving Find forms with dynamic population of pop-up menus from a changing database value list. In this way, an index page of some kind could be referred to throughout a web site and not require another database hit after the first request.