ragazzi io ho uno script che leggedal database e invia l output a flash adesso per aggiungere a quello script di scrivereal db cosa devo cambiare
Codice PHP:
<?php
$host 
'localhost';    # l'host in cui risiede il database (IP)
$user 'root';            # la username per accedere al database
$pass '';                # la password per accedere al database
$db 'Tutorial';        # il nome del database

mysql_connect($host,$user,$pass);    #connessione al database
mysql_select_db($db);                #selezionee al database

$tot 5;    # il numero di news da visualizzare
$i 0;        # variabile che servirà da indice (che incrementeremo)
$query "SELECT id,titolo,testo,DATE_FORMAT(data, '%d.%m.%Y') as newData
            FROM news
            ORDER by data desc
            LIMIT 0,
$tot";
$result mysql_query($query);
$output 'tot='.mysql_num_rows($result);
while(
$news mysql_fetch_array($result))
{
    
$output .= '&data'.$i.'='.$news['newData'];
    
$output .='&titolo'.$i.'='.urlencode($news['titolo']);
    
$output .='&testo'.$i.'='.urlencode(substr($news['testo'],0,200));
    
$i++;
}
echo 
$output;
?>
nel database ci sono i capi id titolo testo data