How to disable the like link after it has been clicked ???

My Code

echo "<a href=like.php?id=$pid>like($plike)</a>";

Recommended Answers

All 3 Replies

Please help its urgent...............

Member Avatar for diafol

use javascript to hide it or replace it with an 'unlike link'. If the latter case is what you need, it's a 'toggle' function, for which jquery may be useful.

However, this needs to be stored in a DB if you wish this to be enforced on a future page impression. So, you may need to implement ajax functionality for the like/unlike button which performs an action on a 'likes' table.

Please help me out I am still facing the problem. Its really urgent.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.