I've got DBMan up and running fine but whenever I change the html_view_success sub routine to the code below I get the following error
DBMan encountered an internal error. Please enable debugging to view.
If I enable debugging, I still get the same error. Can someone take a look at the code and tell me where I'm going wrong. I've chmod the file to the correct permission after I've uploaded it so I know that's not the problem.
Here's the sub routine code...
sub html_view_success {
# --------------------------------------------------------
# This page displays the results of a successful search.
# You can use the following variables when displaying your
# results:
#
# $numhits - the number of hits in this batch of results.
# $maxhits - the max number of hits displayed.
# $db_total_hits - the total number of hits.
# $db_next_hits - html for displaying the next set of results.
#
my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: Search Results.</title>
</head>
<body bgcolor="#ffffff">
<table width="760" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" bgcolor="#B7B6B6"><img src="images/shim.gif" width="1" height="325"></td>
<td><table width="758" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3"><img src="images/shim.gif" width="3" height="325"></td>
<td width="163" valign="top"><img src="images/shim.gif" width="163" height="5"><br>
<img src="images/title_news.gif" width="165" height="16"> <span class="maintext"><img src="images/shim.gif" width="165" height="3"><br>
dfhdljfhfkljahdsfasLorem ipsum dolor sit amet, consectetuer
adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
minim veniam, quis nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat. Duis autem
vel eum iriure d<a href="javascript:;" onFocus="if(this.blur)this.blur()"></a><br>
<br>
</span> </td>
<td width="5"><img src="images/shim.gif" width="5" height="325"></td>
<td width="1" valign="middle"><img src="images/divide.gif" width="1" height="315"></td>
<td width="5"><img src="images/shim.gif" width="5" height="325"></td>
<td width="400" align="center" valign="top"><img src="images/shim.gif" width="400" height="5"><BR>
<img src="images/shim.gif" width="575" height="5"><br>
<p><$font>
Your search returned <b>$db_total_hits</b> matches.</font>
|;
if ($db_next_hits) {
print "<br><$font>Pages: $db_next_hits</font>";
}
# Go through each hit and convert the array to hash and send to
# html_record for printing.
for (0 .. $numhits - 1) {
print "<P>";
&html_record (&array_to_hash($_, @hits));
}
if ($db_next_hits) {
print "<br><$font>Pages: $db_next_hits</font>";
}
print qq|
<p>
<table border=0 bgcolor="#DDDDDD" cellpadding=5 cellspacing=3 width=500 valign=top>
<tr><td>|; &html_footer; print qq|</td></tr>
</table>
</td>
<td width="3"><img src="images/shim.gif" width="3" height="325"></td>
</tr>
</table></td>
<td width="1" bgcolor="#B7B6B6"><img src="images/shim.gif" width="1" height="325"></td>
</tr>
<tr>
<td colspan="3"><img src="http://file:/...es/bar_companies.gif" width="760" height="20"></td>
</tr>
</table>
</body>
</html>
|;
}
----------------------------------
http://www.andrew-banks.co.uk
DBMan encountered an internal error. Please enable debugging to view.
If I enable debugging, I still get the same error. Can someone take a look at the code and tell me where I'm going wrong. I've chmod the file to the correct permission after I've uploaded it so I know that's not the problem.
Here's the sub routine code...
sub html_view_success {
# --------------------------------------------------------
# This page displays the results of a successful search.
# You can use the following variables when displaying your
# results:
#
# $numhits - the number of hits in this batch of results.
# $maxhits - the max number of hits displayed.
# $db_total_hits - the total number of hits.
# $db_next_hits - html for displaying the next set of results.
#
my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: Search Results.</title>
</head>
<body bgcolor="#ffffff">
<table width="760" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" bgcolor="#B7B6B6"><img src="images/shim.gif" width="1" height="325"></td>
<td><table width="758" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3"><img src="images/shim.gif" width="3" height="325"></td>
<td width="163" valign="top"><img src="images/shim.gif" width="163" height="5"><br>
<img src="images/title_news.gif" width="165" height="16"> <span class="maintext"><img src="images/shim.gif" width="165" height="3"><br>
dfhdljfhfkljahdsfasLorem ipsum dolor sit amet, consectetuer
adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
minim veniam, quis nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat. Duis autem
vel eum iriure d<a href="javascript:;" onFocus="if(this.blur)this.blur()"></a><br>
<br>
</span> </td>
<td width="5"><img src="images/shim.gif" width="5" height="325"></td>
<td width="1" valign="middle"><img src="images/divide.gif" width="1" height="315"></td>
<td width="5"><img src="images/shim.gif" width="5" height="325"></td>
<td width="400" align="center" valign="top"><img src="images/shim.gif" width="400" height="5"><BR>
<img src="images/shim.gif" width="575" height="5"><br>
<p><$font>
Your search returned <b>$db_total_hits</b> matches.</font>
|;
if ($db_next_hits) {
print "<br><$font>Pages: $db_next_hits</font>";
}
# Go through each hit and convert the array to hash and send to
# html_record for printing.
for (0 .. $numhits - 1) {
print "<P>";
&html_record (&array_to_hash($_, @hits));
}
if ($db_next_hits) {
print "<br><$font>Pages: $db_next_hits</font>";
}
print qq|
<p>
<table border=0 bgcolor="#DDDDDD" cellpadding=5 cellspacing=3 width=500 valign=top>
<tr><td>|; &html_footer; print qq|</td></tr>
</table>
</td>
<td width="3"><img src="images/shim.gif" width="3" height="325"></td>
</tr>
</table></td>
<td width="1" bgcolor="#B7B6B6"><img src="images/shim.gif" width="1" height="325"></td>
</tr>
<tr>
<td colspan="3"><img src="http://file:/...es/bar_companies.gif" width="760" height="20"></td>
</tr>
</table>
</body>
</html>
|;
}
----------------------------------
http://www.andrew-banks.co.uk