Please help...
ok something odd is happening, and I can't figure it out. I'm new to perl. any help would be GREATLY apreciated:
I have altered the htlp.pl html_record procedure to return rows of a table instead of a table per record. This works fine.
then I went and added an if statement to the html_record so that within that table it would decide:
{
print qq|
<TD><A HREF="mailto:$rec{'email'}>$rec{'email'}</A></TD>
|;;
}
else
{
print qq|
<TD>Hidden</TD>
|;;
}
In all but one case this works fine. When html_record is called, it lists out the table and those records with show_email = yes have a clickable email link....those with show_email = No (else) display the word "hidden"
HOWEVER if html_record is called from a search form (ie any other method than "list all) AND the database field "show_email" is specified as a search parameter...the results table is correctly created except that those with show_email = Yes list "Hidden" and those with show_email = No list the email address.
Every search will work correctly unless the user includes the "show_email" field as a search paramter. If they do, then it appears (from the result table built in html_record) that each record has the opposite value in "show_email" that it actually does.
Please help!
[This message has been edited by David Meade (edited April 29, 2000).]
ok something odd is happening, and I can't figure it out. I'm new to perl. any help would be GREATLY apreciated:
I have altered the htlp.pl html_record procedure to return rows of a table instead of a table per record. This works fine.
then I went and added an if statement to the html_record so that within that table it would decide:
Code:
if ($rec{'show_email'} eq "Yes") {
print qq|
<TD><A HREF="mailto:$rec{'email'}>$rec{'email'}</A></TD>
|;;
}
else
{
print qq|
<TD>Hidden</TD>
|;;
}
In all but one case this works fine. When html_record is called, it lists out the table and those records with show_email = yes have a clickable email link....those with show_email = No (else) display the word "hidden"
HOWEVER if html_record is called from a search form (ie any other method than "list all) AND the database field "show_email" is specified as a search parameter...the results table is correctly created except that those with show_email = Yes list "Hidden" and those with show_email = No list the email address.
Every search will work correctly unless the user includes the "show_email" field as a search paramter. If they do, then it appears (from the result table built in html_record) that each record has the opposite value in "show_email" that it actually does.
Please help!
[This message has been edited by David Meade (edited April 29, 2000).]