i want to store user clicks in database using php and jquery
<p>My users table field is id,name,twitter and clicks
(clicks is hidden )</p>

<p>Logic is : whenever user clicks on another users twitter id then it should be counted and then new updated click should be stored in database.
i can do above logic.</p>

<p>But i don't know that how to detect clicks made by mouse on any link.
I mean
If the link is <a href="http://www.twitter.com/twitter" rel="nofollow">http://www.twitter.com/twitter</a> now if user clicks on that link then clicks of that link should be increased by 2.
please provide me proper info for it.
any help ?</p>

<p>Update:</p>

<pre><code>    &lt;?php 

$con = mysql_connect("localhost","root","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
mysql_select_db("users", $con);

$result = mysql_query("SELECT *
FROM `users`
ORDER BY `users`.`clicks` DESC
LIMIT 0 , 30");

while($row = mysql_fetch_array($result))
  {
  echo $row['id'] . " &lt;a href=" . $row['twitter']." target='_blank'&gt;".$row['clicks']."&lt;/a&gt;";
  echo "&lt;br /&gt;";
  }
// some click detection code may be here..


mysql_close($con);


?&gt;
</code></pre>

<p>Just any one tell me that how to store clicks in variable from $row['clicks']
if jquery is needed, then pls provide proper code that best match my above code.</p>
