You would need to write a PHP script that updates the field. Then the link in the email would be to that PHP script.
There is no need to pass both the id and the email fields to the script. Instead, you should just pass the id field.
Here is a script that should get you started:
PHP Code:
<?php
mysql_connect('localhost', 'user', 'pass');
mysql_select_db('db_name');
mysql_query("UPDATE table_name SET validated='1' WHERE id='".$HTTP_GET_VARS['id']."'");
?>
And the link would be like:
Code:
http://example.com/validate.php?id=123
Bookmarks