# Here getting always link in this conditional

**URL:** <https://discourse.cakephp.org/t/here-getting-always-link-in-this-conditional/999>\
**Category:** Need Help\
**Created:** [August 17, 2016, 8:18pm UTC](https://discourse.cakephp.org/t/here-getting-always-link-in-this-conditional/999 "2016-08-17T20:18:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lsepolis123](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@lsepolis123](https://discourse.cakephp.org/u/lsepolis123)\
**Post date:** [August 17, 2016, 8:18pm UTC](https://discourse.cakephp.org/t/here-getting-always-link-in-this-conditional/999/1 "2016-08-17T20:18:27Z")

</div>

`<td><?php echo (h($listing->url)!="") ? "<a href='".h($listing->url)."'>www</a>" : "" ; ?></td>`

here getting always www  
In case No url i get www link of current page url eg `<a href="http://myUrl.com/listings">www</a>`

how not get www link in case in db table url field nothing or one space…?

---

<div class="post-metadata">

**Author:** ![lsepolis123](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@lsepolis123](https://discourse.cakephp.org/u/lsepolis123)\
**Post date:** [August 21, 2016, 10:24am UTC](https://discourse.cakephp.org/t/here-getting-always-link-in-this-conditional/999/2 "2016-08-21T10:24:38Z")

</div>

```
<?php $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>
....................................
<td><?php echo ((h($listing->url)!="" && h($listing->url) != $actual_link ) ? ("<a href='".h($listing->url)."'>www</a>") : "") ; ?></td>

```

this always getting TRUE any idea why…? please note exist www hyperlinks that have $actual\_link as link so i want hide www but shown …  
problem here  
h($listing-\>url) != $actual\_link )  
always TRUE but exist equal links in case empty links (=No link exist in db)  
WHY ANY HINT…?
