Codice PHP:
// Connessione
$query mysql_query("SHOW TABLE STATUS WHERE name = 'nome_tabella'");
$row mysql_fetch_assoc($query);
$nextID $row['Auto_increment'];