Salve a tutti, ho un profondo vuoto di memoria.
Ho questo codice
Codice PHP:
<?php
$hostname = "*";$dbname = "*";$user = "*";$pass = ""
;$db = new PDO ("mysql:host=$hostname; dbname=$dbname", $user, $pass); if(isset($_POST['check'])){$date_str = $_POST['data'];
$converted = date("Y-m-d", strtotime($date_str));
$sQuery22 = "SELECT maschera FROM utente where maschera like 'TOPOLINO' and data ='$converted'";
$rResult22 = $db->query($sQuery22)->fetchAll();
echo "<table max-width:100px; border=\"2\"> \n"; echo " <tbody>";
echo "<thead> <tr><th>Tipologia</th><th>Prenotati</th><th>Disponibilità</th></tr> </thead> ";
echo " <tr><td align =center width=200>",TOPOLINO,"</td>"; echo "<td align =center><p>",count($rResult22),"</p></td>";
echo "<td align =center>1</td>";
echo " </tbody></table>";
}?>
Vorrei sapere come fare per rendere di colore rosso quando il result22 è uguale ad 1.
Grazie.