Update index.php

Fixed echo statement, and bugs.