View Single Post
Old 06-17-2022, 10:39 PM  
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,184
Another quick if statement question & sql query

I'm trying to make a data entry from my database bold if it meets the 'yes' criteria in the 'sponsor' field.

I have this so far but, I can't seem to get it working, any help on where/what I am screwing up please?

Quote:
<?php if($statement=='IF(SELECT Name, IF(Sponsor='Yes')
FROM TABLE;){ echo "<strong>";}?>
The text HERE
<?php if($statement=='IF(SELECT Name, IF(Sponsor='Yes')
FROM TABLE;){ echo "</strong>";}?>
Is the above even a 'thing'?

I think I'm on the right track but screwing up calling the data and IF statement correcty?

The $conn is opened a little further up the page, and closed below where I want this bold text to appear.

OR as an alternative, should I just put <b></b> around the name in the SQL database and just use htmlspecialchars? Any potential issues with doing that?
__________________
Extreme Link List - v1.0
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote