1) Database Method: To insert the data, you would run a query and use INSERT to put it in a database.
2) Email Method: When they register, call mail() with the appropiate parameters. 😉
3) Both: When you insert the user's data into the database, call mail() with the appropiate parameters. 😉