che devi fare solo questo:
Codice PHP:
$query 'INSERT INTO
titolo
(artista_nm, artista_cgm, titolo_cd, anno, major)
VALUES
("' 
.$_POST['artista_nm'] . '",
"' 
.$_POST['artista_cgm'] . '",
"' 
.$_POST['titolo_cd'] . '",
"' 
.$_POST['anno'] . '",
"' 
.$_POST['major'] . '")';
$last_id mysql_insert_id();
echo 
$last_id
questo cosa ti restituisce?