Changed index.php(added function success)