update index.php and clear messages