add badgename to database
show badge name instead of id
generalize function
encode form data