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

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 …

Jump to Post

All 3 Replies

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

Member Avatar

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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.