Salve a tutti
Ho scritto questo codice:
Volevo fare una verifica, se il sesso è Uomo lascia la prima tabella in questo modo:codice:<?phpinclude("config/require.php"); include("public/templates/header.php"); header("Vary: Accept"); header("Content-Type: text/html;charset=UTF-8"); echo'<?xml version="1.0" encoding="UTF-8?>'; ?> <div id='container'> <div id='main-content'> <?php $q = "SELECT * FROM contacts ORDER BY created_at DESC"; $r = mysql_query($q); if(mysql_num_rows($r)>0): ?> <h4>Recenti</h4> <?php while($row = mysql_fetch_assoc($r)): ?> <table border="0" bgcolor="#5877ac" width="600" height="40" gt; <tr> <td style='text-align:left;'><?php echo $row["Sesso"];?> </tr> </table> <table border="0" bgcolor="#E4E4E4" width="600" height="150" gt; <tr> <td><?php echo $row["Messaggio"]; ?></td> </tr> <?php endwhile; elseif(mysql_num_rows()==0)://nothing in the database ?> <div class='welcome-bg'> Benvenuto<br/> <a href='javascript:showPage("add");' class='add_button' style='margin:auto;'></a> </div> <?php endif; ?> </div> </div> </body> </html>
Se il sesso è Donna, così:codice:<table border="0" bgcolor="#5877ac" width="600" height="40" gt;
Come posso fare?codice:<table border="0" bgcolor="#FF99FF" width="600" height="40" gt;
Grazie in anticipo

Rispondi quotando
