title: validation link via email
body: <p>When a user subscribes to my newsletter via their email address, using php, how would I send them an 'Activation Link' via email to confirm it is their email address and not a fake one. </p>
  
  <p>so at the moment I have</p>
  
  <p>PHP:</p>
  
  <pre><code>&lt;?php
   $to = "recipient@example.com";
   $subject = "Hi!";
   $body = "Hi,\n\nHow are you?";
   if (mail($to, $subject, $body)) {
     echo "&lt;p&gt;Message successfully sent!&lt;/p&gt;";
    } else {
     echo "&lt;p&gt;Message delivery failed...&lt;/p&gt;";
    }
   ?&gt;
  </code></pre>
  
  <p>I guess i would change the $body to this:</p>
  
  <pre><code>$body = "Please click the link to activate your email \n
  http://www.activationlink.com?";
  </code></pre>
  
  <p>How would I make it so that if a user clicked that link it would add their details to the Mysql database recognising they are a legitimate subscriber?</p>
  
  <p>Any help or suggestions appreciated. Thanks</p>