Per prima cosa aggiungi alla tabella i due campi (vedi tu se usate il tipo datetime o timestamp).
creazione del record:
Codice PHP:
$now = date('Y-m-d'); // se usi datetime, controlla il formato usato dal db. Di solito è Anno-Mese-giorno
// se usi timestamp $now = time();
$query = mysql_query("INSERT INTO testi(... , 'modified', 'created') VALUES (..., '$now', '$now')");
modifica record
Codice PHP:
$now = date('Y-m-d');
$query = mysql_query("UPDATE test SET ... , created = '$now' WHERE id=$id ");
I ... sta per tutti i campi che devi salvare
Stampa dei dati del record
Codice PHP:
$TestiSito = @mysql_query("SELECT * FROM Testi ");
while($row = mysql_fetch_assoc($TestiSito)){
echo "Testo {$row['nome']} creato il ". date('d m Y', strtotime($row['created']));
echo '.Ultima modifica il '. date('d m Y', strtotime($row['modified'])).'
';
}