Forum Moderators: coopster
The code in the form specifying the redirect is:
<input type=hidden name="missing_fields_redirect" value="../error.php">
The error function code is:
// our mighty error function..
function print_error($reason,$type = 0) {
build_body($title, $bgcolor, $text_color, $link_color, $vlink_color, $alink_color, $style_sheet);
// for missing required data
if ($type == "missing") {
if ($missing_field_redirect) {
header("Location: $missing_field_redirect?error=$reason");
exit;
} else {
?>
The form was not submitted for the following reasons:<p>
<ul><?
echo $reason."\n";
?></ul>
Please use your browser's back button to return to the form and try again.<?
}
} else { // every other error
?>
The form was not submitted because of the following reasons:<p>
<?
}
echo "<br><br>\n";
exit;
}
I thought I could just use <? echo $reason?> but that didn't work.
Any help would be appreciated.
[edited by: jatar_k at 7:34 pm (utc) on Aug. 15, 2005]
[edit reason] removed url [/edit]
I'm not a skilled programmer and everything that I try is just getting me more and more frustrated. I'll just leave a generic error message.
Thanks anyway.
-- th1
<input type=hidden name="missing_fields_redirect" value="../error.php?error=$reason"> and when I used <? echo $_GET['error'];?> I got $reason displayed on the error.php page.
-- th1