Gossamer Forum
Home : Products : DBMan : Installation :

CGI Error on modification

Quote Reply
CGI Error on modification
Made modifications to products.pl here is the error and the pl file. I the end of file on products and products1 is the same at line 1443 and 1444. Can someone help?

CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: Missing right bracket at ./products.pl line 1443, at end of line
syntax error at ./products.pl line 1443, at EOF


sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.

my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#000000';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';


print qq|
<table border="0" cellpadding="0" cellspacing="0">|;
if ($rec{'Price'}) {
print qq|
<tr>
<td width="100%" align="center"><$font>PRICE: $rec{'Price'}</font></td>
</tr>
|;
}
print qq| |;
if ($rec{'Image'}) {
print qq|
<tr>
<td width="100%" align="center"><img border="2" src="http://www.absolutedesire.com/images/products/$rec{'Image'}" width="150" alt="Click on image to add this product to your shopping cart"></td>
</tr>
|;
}
print qq| |;
if ($rec{'Name'}) {
print qq|
<tr>
<td width="100%" align="center"><$font>$rec{'Name'}</font></td>
</tr>
</table>
|;
}



thanks
queticon


[This message has been edited by JPDeni (edited April 03, 2000).]
Quote Reply
Re: CGI Error on modification In reply to
In the future, please do not post entire files to the forum. It takes too long to load the page and they are very difficult to read. It's much better if you save your file as a .txt file like you did earlier.

In sub html_record, you have

Code:
if ($rec{'Name'}) {
print qq|
<tr>
<td width="100%" align="center"><$font>$rec{'Name'}</font></td>
</tr>
</table>
|;
}

It should be

Code:
if ($rec{'Name'}) {
print qq|
<tr>
<td width="100%" align="center"><$font>$rec{'Name'}</font></td>
</tr>
|;
}
print qq|</table>|;
}

I'm going to go ahead and edit your previous post so that only the subroutine that caused you problems will be showing, in order to make the page load more quickly.


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





Quote Reply
Re: CGI Error on modification In reply to
That worked. I am sorry for posting whole file. I will use .txt in the future. teach me to code in the middle of the night.

Thanks

Queticon