updated php functionality of flashcard section along with database control