At http://redundantcartridge.com/dbman/text/dbfaq8.txt I found
"Using default value of http:// but not display if blank"
If it's just the URL field alone use:
|;
if (length($rec{'URL'}) > 7) {
print qq|<a href="$rec{'URL'}">$rec{'URL'}</a> |;
}
print qq|
So instead of
if ($rec{'Hjemmeside'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Hjemmeside:</FONT></TD>
<TD WIDTH="80%"> <$font><a href="$url{'Hjemmeside'}">$rec{'Hjemmeside'}</a>
|;
}
I used
if (length($rec{'Hjemmeside'}) > 7) {
print qq|<a href="$rec{'Hjemmeside'}">$rec{'Hjemmeside'}</a> |;
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Hjemmeside:</FONT></TD>
<TD WIDTH="80%"> <$font><a href="$url{'Hjemmeside'}">$rec{'Hjemmeside'}</a>
|;
}
(Hjemmeside is norwegian for Homepage)
This resulted in the URL getting printed both in the field for email (Epost) and the field for URL (Hjemmeside) and in one instance on top over the table.
This is viewable at www.nicklisten.no/cgi-bin/dbman/db.cgi. You can log on as test/test. See ID 6 and 7.
The question is: How do I fix this?
My files can be found at:
www.nicklisten.no/files/db_pl.txt
www.nicklisten.no/files/default_cfg.txt
www.nicklisten.no/files/html_pl.txt
Jan Peter
"Using default value of http:// but not display if blank"
If it's just the URL field alone use:
|;
if (length($rec{'URL'}) > 7) {
print qq|<a href="$rec{'URL'}">$rec{'URL'}</a> |;
}
print qq|
So instead of
if ($rec{'Hjemmeside'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Hjemmeside:</FONT></TD>
<TD WIDTH="80%"> <$font><a href="$url{'Hjemmeside'}">$rec{'Hjemmeside'}</a>
|;
}
I used
if (length($rec{'Hjemmeside'}) > 7) {
print qq|<a href="$rec{'Hjemmeside'}">$rec{'Hjemmeside'}</a> |;
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Hjemmeside:</FONT></TD>
<TD WIDTH="80%"> <$font><a href="$url{'Hjemmeside'}">$rec{'Hjemmeside'}</a>
|;
}
(Hjemmeside is norwegian for Homepage)
This resulted in the URL getting printed both in the field for email (Epost) and the field for URL (Hjemmeside) and in one instance on top over the table.
This is viewable at www.nicklisten.no/cgi-bin/dbman/db.cgi. You can log on as test/test. See ID 6 and 7.
The question is: How do I fix this?
My files can be found at:
www.nicklisten.no/files/db_pl.txt
www.nicklisten.no/files/default_cfg.txt
www.nicklisten.no/files/html_pl.txt
Jan Peter