I have a checkbox that users can check when they add a record to whether they want to display their private information (i.e. email address and phone number) or if they check the box, they want to use the private mailer mod I have setup.
So I have this code, but its not working:
print qq|
<TR><TD colspan=2><$font_color>
This user has preferred for all contacts to use our private mailer option.<p>
Click <a href="$db_script_link_url&$db_key=$rec{$db_key}&send_email_form=1">here</a> to contact this user.
<p>
</TD></TR>|;
}
else {
print qq|
<TR><TD width="200"><$font_color>Email:</FONT></TD>
<TD align="right"> <$font>$rec{'Email2'}</font><p></TD></TR>
<TR><TD width="200"><$font_color>Phone:</FONT></TD>
<TD align="right"> <$font>$rec{'Phone2'}</Font><p></TD></TR>
|;
}
Ive also tried the if ($rec{'Pmailer'} eg "Yes") and if ($rec{'Pmailer'} == 1), but neither of those worked either. Right now, as I have it above, it is showing the private mailer link no matter if the user checks the box or not. Can someone give me a little direction as to the right code?
So I have this code, but its not working:
Code:
if ($rec{'Pmailer'}) { print qq|
<TR><TD colspan=2><$font_color>
This user has preferred for all contacts to use our private mailer option.<p>
Click <a href="$db_script_link_url&$db_key=$rec{$db_key}&send_email_form=1">here</a> to contact this user.
<p>
</TD></TR>|;
}
else {
print qq|
<TR><TD width="200"><$font_color>Email:</FONT></TD>
<TD align="right"> <$font>$rec{'Email2'}</font><p></TD></TR>
<TR><TD width="200"><$font_color>Phone:</FONT></TD>
<TD align="right"> <$font>$rec{'Phone2'}</Font><p></TD></TR>
|;
}
Ive also tried the if ($rec{'Pmailer'} eg "Yes") and if ($rec{'Pmailer'} == 1), but neither of those worked either. Right now, as I have it above, it is showing the private mailer link no matter if the user checks the box or not. Can someone give me a little direction as to the right code?