At the moment i'm showing a slider out of my database on my website with this piece of code:
<?php
$query="SELECT * FROM seo_slider ORDER BY id";
$stmt = $pdo->query($query);
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($result as $row) {
?>
<ul class="rslides">
<li><figure><a href="<?php echo $row['link']; ?>"><img src="http://www.onderdemolen.nl/images/slider/<?php echo $row['id']; ?>.jpg" alt="<?php echo $row['titel']; ?>" /></a>
<div class="caption"><div class="titel"><h1><?php echo $row['titel']; ?></h1></div><div class="beschrijving"><h3><?php echo $row['caption']; ?></h3></div></div></figure></li>
</ul>
<?php
}
?>
In my table seo_slider I also have a field called "actief" in here it says 0 or 1. I want that the slides on my website only to show when the slide has 0 in "actief". And when it says 1 the slide won't show on my website. I already tried some things but can't get it to work. Would be nice if somebody could help me!