hide actual email/web address
Back in the day, pre-mysqli, I used this snippet to hide information from database field, yet provide a link IF there was something in the field.
<?php if (strlen($row_TABLENAME['RECORD_NAME'])>1) { ?>
WEBSITE (which is then linked to field using href or mailto as appropriate)
<? } ?>
I tried:
<?php if (strlen($row_bizcat109['biz_website'])>1) { ?>
<a href="<?php echo($row_bizcat109->getColumnVal("biz_website")); ?>">WEBSITE</a>
<? } ?>
and
<?php if (strlen($bizcat109['biz_website'])>1) { ?>
<a href="<?php echo($bizcat109->getColumnVal("biz_website")); ?>">WEBSITE</a>
<? } ?>
with no luck.
I should mention that the category is a sort element to get the right category from biz database.
<?php
$bizcat109 = new WA_MySQLi_RS("bizcat109",$maps2021,0);
$bizcat109->setQuery("SELECT * FROM biz WHERE cat_ID = 109");
$bizcat109->execute();
?>
Now, I am trying to do it using WA mysqli system where I want the words WEBSITE and EMAIL to be the linked words, hiding the actual database field. And nothing to show if empty.
<a href="https://<?php echo($bizcat105->getColumnVal("biz_website")); ?>" target="_blank">
<?php echo($bizcat105->getColumnVal("biz_website")); ?>
<a href="https://<?php echo($bizcat105->getColumnVal("biz_email")); ?>" target="_blank">
<?php echo($bizcat105->getColumnVal("biz_email")); ?>
</a>
Any pointers, most appreciated.