Grazie Carlo, grazie Nicola.
Ho risolto cosi:
Codice PHP:
Function home($flag){
//include(connessione.php);
@mysql_connect("localhost", "root", "") or die("Connessione fallita !");
@mysql_select_db("my_db") or die("Selezione Database fallita !");
$sql="SELECT * from news where categoria='$flag' ORDER BY id DESC LIMIT 2";
$select = @mysql_query($sql) or die("Query fallita !");
$i=0;
while($riga=mysql_fetch_array($select)){
$id=$riga["id"];
$titolo1=$riga["descrizione"];
$collega=$riga["collegamento"];
$data=$riga["data_news"];
$fonte=$riga["fonte"];
if(is_int($i/3)){
$color = "#F8F8F8";
}
echo"<table width=\"374\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
echo"<tr>";
echo" <td class=\"newstesto\" bgcolor=\"$color\"><A HREF=\"$collega\"target=\"_blank\">$titolo1<a></td>";
echo" </tr>";
echo"<tr>";
echo" <td class=\"data\" bgcolor=\"$color\">$fonte. $data</td>";
echo" </tr>";
echo" <tr>";
echo" <td height=\"5\"></td>";
echo" </tr>";
echo"</table>";
}
}