The psuedocode snippet looks something like this (the actual listing is
too huge)

[-
if passed data
        perform error checking
else
        $new_entry = 1;
-]

<HTML><HEAD><TITLE></TITLE></HEAD>
<BODY>
[$ if( ($new_entry) || ($f->errors()) ) $]
[+ $f->display_errors_as_html(); +]

blank form stuff...

[$ else $]
[-
use Apache;
use Apache::Constants qw(REDIRECT);

$req_rec->header_out("Location" => 'url_to_redirect_to');
$req_rec->status(REDIRECT);
-]
[$ endif $]

Note:  The display_errors_as_html method doesn't send out any headers of
it's own.

The blank form gets display correctly and if there are no errors the
redirect works properly.

Reply via email to