I wish to write simple counter for links/tags. And So I have tags and random displayed these to the web site

$zmienna = "SELECT name, link FROM tag_content ORDER BY RAND() LIMIT 4";
$result2 = mysql_query($zmienna);
echo $result2;
while($row=mysql_fetch_array($result2)){
    echo "<a href='http://www.simplelink.xx/tag/".$row['link']."'>".$row['name']."</a><br>";
}

And today I wish to count the number of customers clicked on tags. I produced another row named "wys" and attempted to create SQL stuff

$wtf = "UPDATE tag_content SET wys=wys+1 WHERE id=2";
$result3=mysql_query($wtf);

As u can easily see it only works best for tag id = 2. And today the issue: steps to make it work with all tags?

For instance: I've 4 tags with various id. Steps to make counter "read" the particular clicked on tag making it add "1" towards the "wys"?

Thx for help and tell me if u require more information (like code etc.)

Because the link area is exclusive, you can just utilize it being an identifier rather than id.

$wtf = "UPDATE tag_content SET wys=wys+1 WHERE link='".$something."";

where $something is really a last a part of page URL (you need to parse it). Obviously you should also take a look variable prior to using it, since you first got it from client side also it might have code for SQL-injection.

You'll need a method of getting the id of links. Either provide it as being a question parameter for that link, or use parse the title and url in the clicked on link making a relevant Choose to obtain the id to loop over.

Use jquery :eq() selector to discover the precise link and then suggest an ajax request upgrading the count