Update to index.php

Cleans up the outdated mysql queries, turns on errors (can be turned off easily)
Merge pull request #1 from Dwebtron/patch-1

Small tweaks, makes error reporting on on default.