Jaynesh Posted July 9, 2011 Share Posted July 9, 2011 Hello Whenever somebody clicks a link it runs this query: INSERT INTO Posts_share(user_id, post_id) VALUES ($user, $up) How do I stop it from duplicating the same data if somebody clicks it again? Quote Link to comment https://forums.phpfreaks.com/topic/241501-duplicate-entries/ Share on other sites More sharing options...
IrOnMaSk Posted August 2, 2011 Share Posted August 2, 2011 one is nicely ask users not to click the link more than one or do a simple validation... check the value in $user and $up against the database... if values being passed are same, make php-freaks out with an error message Quote Link to comment https://forums.phpfreaks.com/topic/241501-duplicate-entries/#findComment-1250887 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.