corrected syntax error in index.php
added  variable back to db connection code
corrected syntax error in dbconnect
mysql_close removed
another try to make db connection a variable
add mysql_close back with variable