Gossamer Forum
Home : Products : DBMan : Customization :

When viewing DB, how to ignore empty lines?

Quote Reply
When viewing DB, how to ignore empty lines?
I have the DB setup for anyone to view, but admin to modify, add, delete, etc. How can I set it up to where when someone clicks the link to view my category in my DB, if there is a field left blank (when the admin added it, say "Age: ") I dont want that title to show Age, rather ignore it all together. Is that possible?

Thanks
Michele
Quote Reply
Re: When viewing DB, how to ignore empty lines? In reply to
You have to use if/else statements to make this work, like the following:

Code:
if ($rec{'Age'}) {
print qq|$rec{'Age'}|;
}
else {
print qq| |;
}

You will have to add your html codes between the print qq| and |;.

Hope this helps.

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