Re the last suggestion, ensure you keep those database details outside the web root (ie in a file called connect.inc for example) or if have to keep it there add a .htaccess file that prevents download of *.inc files. Also, avoid use of the error suppression operator (@). You need to see your errors.