First, add a column activate in user database and the value will be 0 by default.
Now write a PHP code in your registration.php file as
<?php
$id=this is the id of students comes from database.
/* Now hash the id*/
$id_hash=md5($id);
$to=email of registered students;
$subjects= “Email activation”;
$body=“Hi, User
Thank you for register. Please verify your email address.
<a href=”/activate.php?user=<?php echo $id_md5 ?> Click Here</a>"
";
/* Now send the mail with php mail function */
mail($to,$subjects,$body);
?>
Now create a activate.php page and write a php code to update “activate” column in database from 0 to 1 of that user id. Thats it.