PHP Assignment. Database no longer functional