Attached is our Advanced Error Handler (a.k.a Bad Handler).
You can download and configure this and use it with your forms, FormMail, and an HTML template to get the ultimate in error handling for users of your forms.
Please read our HOW-TO Guide for full details about using fmbadhandler.php.
If you're using version 1.16 or earlier of FMBadHandler, please upgrade immediately! Version 1.19 (and later) fixes potential Cross-Site Scripting (XSS) vulnerabilities.
Version 1.08 adds these new features:
If you're using Multi Page forms with FMBadHandler, you must use version 1.09 or later. Version 1.08 contains a bug that causes the browser to lock up when the user clicks the return link to the second or subsequent forms.
- New $SESSION_NAME configuration setting for use with version 7.00 and later of FormMail.
- Adds support for new template tags <fmsyserror> and </fmsyserror>
v1.10 fixes a rarely occurring bug in searching for "selected" and "checked" attributes of fields.
v1.11 works with FormMail version 7.05 (and later) to properly handle authenticated forms.
v1.12 fixes a bug that will only affect you if you use PHP for your forms and you need to access the USER AGENT of the browser in the PHP.
v1.13-v1.15 fixes some rare bugs and allows a template that is a PHP script to access session data.
v1.16 adds useful $REAL_DOCUMENT_ROOT code (copied from FormMail). Adds PHP version check.
v1.17 fixes potential Cross-Site Scripting (XSS) vulnerabilities.
v1.18 fixes a bug in re-filling field values when the user entered $123 or \456 in a field.
v1.19 fixes a potential Cross-Site Scripting (XSS) vulnerabilities when displaying error messages
v1.20 works with FormMail version 8.20 and later and allows all parameters to be passed in the session. This overcomes security problems on some servers.
v1.21 fixes a problem with validating HTML. Prior versions created working but non-valid HTML when filling an error template or when creating the default error page.
v1.22 handles redirects. Supports alternative tag format for templates.
In the ZIP package attached, you'll also find a script called "testurlopen.php". You should upload this to your server and open it with your browser before attempting to use FMBadHandler.
This script tests whether your server's PHP allows it to open URLs. If your server doesn't allow this, then the main use for FMBadHandler - to allow the user to return to the form with their original data already entered - will not work.
In this case, you need to convince your hosting supplier to fix the server or find a better hosting supplier.
Sample Error Template
To help you get started, here's a sample error template: http://www.tectite.com/vbforums/showthread.php?t=121
If you can't download the attachment, it might be because of a bug in Microsoft Internet Explorer 7.
In any case, you can use this alternate download location: