I googled for `php mysql email register`. This returns tutorials, how-tos, code snippets. Most results include flawed DB statements.