i need to Send an email when one user registers on the site from registration page.
This email must contain a link which when clicked should contain:
userid in query string and should update confirm field in database to 1.
Confirmation Email
Moderator: General Moderators
Re: Confirmation Email
So, exactly what is the question? 
Re: Confirmation Email
You add the user to the database after checking if they are correct, using insert. Check if the insert was successful, if yes use the mail function to send the confirmation message.