title: copy text from link to clipboard when clicked
body: <p>I am returning values from a database search that are currently hyperlinked to redirect to <code>search.php</code>. I would like to change my code so that instead of redirecting to <code>search.php</code>, the text of the link will be copied to clipboard when the user clicks it with the mouse and the user will remain on the same page. An easy solution would be greatly appreciated. Here is the code I am currently using.</p>
  
  <pre><code>while($row = mysql_fetch_assoc($find_parts))
  {
  $name = $row['name'];
  
  $id = $row['id'];
  
  echo "&lt;a href='search.php?id=$id'&gt;$name&lt;/a&gt;&lt;br /&gt;";
  }
  </code></pre>
  
  <p>Basically all I want is for <code>name</code> to be copied to clipboard when the link is clicked</p>