How to add data after the activation link is clicked in the confirmation link?

How to add data after the activation link is clicked in the confirmation link?

Hi,

When a user of mine fill a form and submits it, I want a confirmation mail to go the mentioned email address in the form and I wan the data to be accepted to the database only when the user clicks the activation link in the confirmetion link.

How shall I program it?

Thanks,
Vera