![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 | |
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:
![]() 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 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |
Confirmed User
Industry Role:
Join Date: Jan 2003
Location: Nomad Land
Posts: 1,629
|
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:
__________________
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | ||
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,184
|
It gets opened at the top of the page:
Quote:
Quote:
__________________
Extreme Link List - v1.0 |
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Industry Role:
Join Date: Jan 2003
Location: Nomad Land
Posts: 1,629
|
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:
__________________
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |