Grazie.
allora questoè il codice ripulito:
Codice PHP:
<?php include "connect.php";
?>
<?php 
$query 
"SELECT *, DATE_FORMAT(data,'%d.%m.%Y') as data_in FROM news WHERE id = 5";
$res mysql_query($query) OR DIE(mysql_error());
$row mysql_fetch_array($res);
print 
$row[titolo];
print 
$row['testo']; 
print 
"<a href=../files/news/" " target=_blank>";
print 
$row['nome'] . "</a>"//questo è il nome dell'allegato presente nella tabella allego_news
?>
queste le due tabelle:
tabella news
id int(10)
titolo varchar(255) No
testo text
ecc.......

tabella allego_news
id int(10)
id_allegato int(10)
nome varchar(30)
nome_allegato varchar(30)