a slightly improved update.php