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...
# 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
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; }
}
bob

