Update to index.php

Cleans up the outdated mysql queries, turns on errors (can be turned off easily)