I am making a website[Portfolio] with PHP-MySQL. I want to provide favorite functionality for gallery. just click on icon/text/button update query fire without refresh of page.
Let me guess. Choice 1: with iframe and probably no javascript CHoice 2: with ajax which must involve javascript.
Well. First off, if you want users to be able to store this favorite, they'll have to be logged in. You could store a cookie on the user's computer, but that might get deleted, and then the favorite is gone. If you're doing this for "likes" of some sort, just integrate Facebook on the page.