I'm creating a site that lists custom userbars in a forum, and am using both PHP and SQL to achieve this easily. My question is: If a field is listed 'active' for the group, how do I go about adding a class specifically for that, to enable a glow around the Bootstrap card?
Here's my current code (forgive me if it's terrible)
<div class="cards">
<?php
include_once("assets/php/db.php");
$sql = "SELECT ubFilename, ubGroupName, ubGroupOwner, ubOwnerLink, isOfficial, isActiveGroup FROM UBSUserbars ORDER BY ubGroupName";
$resultset = mysqli_query($conn, $sql) or die("database error:". mysqli_error($conn));
while( $record = mysqli_fetch_assoc($resultset) ) {
?>
<div class="col-sm-4 col-card">
<img src="i/OGUsers/<?php echo $record['ubFilename']; ?>">
<hr>
<h4 class="group"><?php echo $record['ubGroupName']; ?></h4>
<span>Owner: <a class="owner" href="<?php echo $record['ubOwnerLink']; ?>"><?php echo $record['ubGroupOwner']; ?></a></span>
</div>
<?php } ?>
</div>