![]() |
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:
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? |
Quote:
How are you getting the results you are looping through? You probably have the sponsor column in those results and can just verify against it. PHP Code:
|
Quote:
Quote:
Quote:
|
Quote:
Instead of printing $name lets print $string which we will add strong tags to in case $sponsor is set to "Yes". PHP Code:
Though if you want to do more logic in case $sponsor is set to Yes than this would be a better way to go. PHP Code:
|
All times are GMT -7. The time now is 11:10 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123