$count = 0;
$conn=connessioneDB();
$sql = "SELECT id,title_ita,text_ita,data_evento FROM news ORDER BY id DESC";
$res = mysql_query($sql,$conn);
$info = mysql_fetch_row($res);
if(!$info)
echo 'Non sono presenti news';
else
{
while($info&&$count<3)
{
$position = 100;
$post = strip_tags($info[2]);
$post = substr($post,0,$position);
echo ''.$info[3].'
'.$info[1].'
'.$post.'
leggi tutto...'; $count++; $info = mysql_fetch_row($res); } } ?>
'.$post.'
leggi tutto...'; $count++; $info = mysql_fetch_row($res); } } ?>
$count = 0;
$conn=connessioneDB();
$sql = "SELECT id,title_ita,text_ita,data_evento FROM press ORDER BY id DESC";
$res = mysql_query($sql,$conn);
$info = mysql_fetch_row($res);
if(!$info)
echo 'Non sono presenti eventi';
else
{
while($info&&$count<3)
{
$position = 100;
$post = strip_tags($info[2]);
$post = substr($post,0,$position);
echo ''.$info[3].'
'.$info[1].'
'.$post.'
leggi tutto...'; $count++; $info = mysql_fetch_row($res); } } ?>
'.$post.'
leggi tutto...'; $count++; $info = mysql_fetch_row($res); } } ?>