Gossamer Forum
Home : Products : DBMan : Customization :

PLEASE I'm going nuts - whats wrong with this?

Quote Reply
PLEASE I'm going nuts - whats wrong with this?
It's me with my recipes again...
Thanks for the suggestion about redundant fields. Now I'm trying to do this but I keep getting errors like:

Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: syntax error at ./recipe_html.pl line 122, near "}"
syntax error at ./recipe_html.pl line 129, near "}"

This is the code ...
print qq|
<H1 align=center>$rec{'Recipe'}</h1>

<p align=center>$rec{'Flag'}<br>
<b>$rec{'Date'}<br>
$rec{'Source'}<br>
<br>
$rec{'Amount1'} $rec{'Ingred1'}<br>

|;

if ($rec{'Ingred2'}{
print qq|
$rec{'Amount2'} $rec{'Ingred2'}
|;
}

print qq|

<p>$rec{'Description'}

|;
}
----------------
If i remove the "if" statement it works. I'm blind I can't see whats wrong.

Any suggestions?
Quote Reply
Re: PLEASE I'm going nuts - whats wrong with this? In reply to
There is a syntax error in the following line:

Code:
if ($rec{'Ingred2'}{

It should be:

Code:
if ($rec{'Ingred2'}){

You have the close off the if statement before inserting the { (bracket).

BTW: If you have telnet access to your account, then you may want to try using the following command line at the prompt:

Code:
perl -c db.cgi

where your db.cgi file is located. Using this command will show you more information about syntax errors than what is provided with the bug error messages within DBMAN.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 17, 1999).]
Quote Reply
Re: PLEASE I'm going nuts - whats wrong with this? In reply to
>It should be:

>if ($rec{'Ingred2'}){

Of course, thanks - 5 in the morning it was a bit hard finding that one. Thanks.

And yes, I've got telnet access. I'll try your suggestion. Thanks for the help.


C.
Quote Reply
Re: PLEASE I'm going nuts - whats wrong with this? In reply to
No problem. Wink

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us