0
I have a news system and it is derived from the status, if $status = Active it appears and if $status = Inactive it does not appear, how can I do this?
<?php
$news8 = mysql_query("SELECT * FROM 10cms_noticias ORDER BY ID DESC LIMIT 8") or die(mysql_error());
?>
<?php $i = 0; while($noticias = mysql_fetch_assoc($news8)){ $i++; ?>
<div class='noticia'>
<div class='img' style='background-image: url(<?php echo $noticias['img']; ?>);'></div>
<div class='titulo'><b><?php echo $noticias['titulo']; ?></b></div>
<div class='desc'><?php echo $noticias['resumo']; ?></div>
<div class='info'>
<div class='comentarios' title="20 Comentários"></div>
<div class='data' title="<?php echo $noticias['data']; ?>"></div>
<div class='autor' title="<?php echo $noticias['autor']; ?>" </div>
</div>
</div>
<?php } ?>
if(status=ativo) {//seu ódigo} else {//menssagem de erro ou assim}
– Jorge B.