DB check in functions and status alerts

Created function to check if DB connection was successful.  Also,
created status JS alert using the $_SESSION superglobal.  Stored a
string in the $_SESSION and used PHP/JavaScript to alert that string.