codice:
mysql_query(INSERT ....... bla bla)
$last_id = mysql_insert_id();