Gossamer Forum
Home : Products : DBMan : Customization :

Still no go with view_failures

Quote Reply
Still no go with view_failures
I recoded the html_view_failure with the below code, but it still dosn't work. I don't get any syntax errors, and it will return everything below else, but it will not recognise the if($db_userid eq "default") statement, it just returns a blank page.
It should work, can you help...
Code:
sub html_view_failure {

# The search for viewing failed. The reason is stored in $message
# and a new search form is printed out.

my ($message) = $_[0];

$page_title = "Search Failed";
&html_page_top;

$submit_button = "View Records";
$reset_button = "Reset Form";

if ($db_userid eq "default") {
print qq|
<center><$font><P>There were problems with the search. Reason:
<$error_color><B>$message</B></FONT>
<BR>Return to <b>Search</b>, fix any errors and submit the search again.</p>
<br><IMG SRC="http://myserver.com/images/sagain.jpg" WIDTH=116 HEIGHT=36 align=left vspace=10></center>
|;
}
else {
print qq|
<center><$font><P>There were problems with the search. Reason:
<$error_color><B>$message</B></FONT>
fix any errors and submit the record again.</p></center>
|;

print qq|
<form action="$db_script_url" method="GET" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
|;

&html_record_form(%in);

&html_search_options;

print qq|
<p><center>
<INPUT TYPE="SUBMIT" NAME="view_records" VALUE="$submit_button">
<INPUT TYPE="RESET" VALUE="$reset_button">
</center></p></form>
|;

&html_footer;
&html_page_bottom; }
}
thanks
bob
Quote Reply
Re: Still no go with view_failures In reply to
Your closing } for your "else" statement is too far down.

Try moving it from

Code:
|;
&html_footer;
&html_page_bottom; }

to

Code:
|; }
&html_footer;
&html_page_bottom;

------------------
JPD