Salve, come faccio fare da questo codice:
essendo che posso farecodice:if($record = $pg->Show()) { ?> <table class="table"> <tr> <th>Username</th> <th>Categoria</th> <th>titolo</th> <th>Active</th> <th>Data</th> <th>Modifica</th> <th>Controllo</th> <th>Cancella</th> </tr> <?php foreach($record as $row) { ?> <tr> <td><?php echo "".$row["_username"]."";?></td> <td><?php echo "".$row["_title"]."";?></td> <td><?php echo "".$row["title"]."";?></td> <td><?php echo "".isActive($row["active"])."";?></td> <td><?php echo "".$row["data_it"]."";?></td> <td><a href="post_edit.php?id=<?php echo $row["id"]; ?>"><img src="ico/edit.png" alt="edit"></a></td> <td><select onchange="if(confirm('Sei sicuro'))document.location.href = 'post_options.php' + this.value; this.options[this.selectedIndex].value;" name="options" onClick="displayElements(this.value);"> <option value="">----------</option> <option value="?go=trash&id=<?php echo $row['id']; ?>">Metti nel cestino</option> <option value="?go=recovery&id=<?php echo $row['id']; ?>">Ripristina</option></select> </td> <td> <a href="post_options.php?go=dellAll&id=<?php echo $row["id"]; ?>"><img src="ico/remove.png" alt="remove"></a> </td> <?php } ?> </td> </tr> </table> <?php } else { echo "<p>Nessun dato</p>"; }ma come faccio agganciargli un colore diverso ?codice:if($row["active"]== 1)else{}
grazie mille.