allora nella pagina "guestbook.php" (dove visualizzo tutti i msg con il ciclo while)..
uso questo cod:
Codice PHP:
<?php
include("config.inc.php");
$db = mysql_connect($db_host, $db_user, $db_psw, $db_name) or die ("Errore Di Connessione Al Server");
$conn = mysql_select_db($db_name, $db) or die ("Errore Di Connessione Al Database");
$query1 = mysql_query("SELECT COUNT(id) FROM messaggi");
$row1 = mysql_fetch_array($query1, $db);
echo "
<html>
<head>
<body>
<table width=\"984\" height=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td align=\"left\" valign=\"top\"><table width=\"984\" height=\"35\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td align=\"center\" valign=\"middle\" class=\"cellatitolo1 Stile3\"><table width=\"100%\" height=\"35\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"25%\"></td>
<td width=\"50%\"><div align=\"center\" class=\"Stile6\">Il Libro Degli Ospiti</div></td>
<td width=\"25%\"><div align=\"center\" class=\"campimodulo\"><a href=\"guestbook/inserisci.htm\">[Inserisci Un Nuovo Messaggio]</a></div></td>
</tr>
</table></td>
</tr>
</table>
<table width=\"984\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td height=\"34\" background=\"images/gb_tb_05.jpg\"><div align=\"center\">
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td><div align=\"center\">[b]
Nel Libro Sono Presenti $row1[0] Messaggi - Gli ultimi 50, sono i seguenti (ordinati dall'ultimo inserito ai precendenti)
[/b]</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<table width=\"100%\" height=\"230\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td valign=\"top\">
</body>
</head>
</html>
";
$query2 = mysql_query("SELECT * FROM messaggi ORDER BY id DESC LIMIT 0,50") or die ("Errore Di Selezione Nel Database");
while ($row2 = mysql_fetch_array($query2, $db))
{echo "
<html>
<head>
<body>
<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td align=\"left\" valign=\"top\"><table width=\"984\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td colspan=\"2\" align=\"center\" valign=\"top\">
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"260\" height=\"180\" align=\"center\" valign=\"top\"><table width=\"253\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td height=\"35\" align=\"center\" background=\"images/gb_tb_01.jpg\">[b]Inserito Da:[/b]</td>
</tr>
<tr>
<td height=\"44\" align=\"center\" background=\"images/gb_tb_02.jpg\">$row2[autore]</td>
</tr>
</table>
<table width=\"253\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td height=\"35\" align=\"center\" background=\"images/gb_tb_01.jpg\">[b]L'E-Mail Di $row2[autore] è: [/b]</td>
</tr>
<tr>
<td height=\"44\" align=\"center\" background=\"images/gb_tb_02.jpg\">$row2[mail_autore]</td>
</tr>
</table> </td>
<td rowspan=\"2\" align=\"center\" valign=\"top\"><table width=\"700\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td height=\"34\" align=\"center\" background=\"images/gb_tb_03.jpg\">[b]Messaggio scritto da $row2[autore] [/b]</td>
</tr>
<tr>
<td align=\"center\" valign=\"middle\" background=\"images/gb_tb_06.jpg\"><table width=\"685\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td><div align=\"justify\">$row2[msg]</div></td>
</tr>
</table></td>
</tr>
<tr>
<td height=\"35\" background=\"images/gb_tb_07.jpg\"></td>
</tr>
</table></td>
</tr>
<tr>
<td></td>
</tr>
</table>
<table width=\"984\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"984\" height=\"34\" background=\"images/gb_tb_05.jpg\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"25%\" align=\"center\"></td>
<td width=\"50%\" align=\"center\">[b]***FINE MESSAGGIO*** [/b]</td>
<td width=\"25%\" align=\"center\"></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
</table>
<table width=\"100%\" height=\"35\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td></td>
</tr>
</table></td>
</tr>
</table>
</body>
</head>
</html>
";
}
mysql_close($db);
?>
---------------------------------------
Bene... in Easy PHP lo vedo bene.... ma in rete no.... perchè?? non mi da alcun errore il server, ma io non visualizzo niente... ho in pratica i campi vuoti, ma il COUNT ID è esatto...
Il db è unico... non uso altri...