mysql_* is deprecated use mysqli_ instead

I fixed most if not all of the mysql_* commands. (Simply changed to mysqli_*)
I also fixed some wrongly linked pages.