update main.php