linked registration to database