register page and function to record data to DB

update the register page and give connection to the DB to record the
information from the register