close mysql connection in footer.