View Single Post
Old 10-07-2012, 02:19 AM   PM User | #1
Trailerpulse
New to the CF scene

 
Join Date: Oct 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Trailerpulse is an unknown quantity at this point
Only post code if MySQL row data exists?

I have this code on my website that grabs the "official" MySQL database row data and spits it out as a clickable link.

The problem is that if the "official" MySQL row is empty, the code spits out the current website page URL.

Is there a way to edit the below code so that it only spits out the below code if there is data in the mysql "official" row?

I'm guessing some sort of IF statement?

PHP Code:
<div class="movietitles"><img src="/images/35genre.png" />Official Site: <a href="{$official}">link</a></div
Trailerpulse is offline   Reply With Quote