title: Emailing a comment to an email address stored in a table
body: <p>In a comment system, I am using variables called <code>$comment</code> and <code>$submittor</code>.  I am using a MySQL table called "login" that contains fields called "username" and "email."</p>
  
  <p>The field "email" is an email address.</p>
  
  <p>I would like to send an email with <code>$comment</code> in it to the "email" where "username" = "$submittor."</p>
  
  <p>Here is what I have so far: </p>
  
  <pre><code>$queryem = sprintf('SELECT email FROM login WHERE username = $submittor');
  </code></pre>
  
  <p>How can I send the email?</p>
  
  <p>Thanks in advance,</p>
  
  <p>John</p>