onclick update data, on MySQL, for Like/Favorite buttonwith out refresh of Page.

Discussion in 'PHP' started by kanha sahu, Jul 27, 2014.

  1. #1
    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.
     
    kanha sahu, Jul 27, 2014 IP
  2. hdewantara

    hdewantara Well-Known Member

    Messages:
    540
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #2
    Let me guess.
    • Choice 1: with iframe and probably no javascript
    • CHoice 2: with ajax which must involve javascript.
     
    hdewantara, Jul 27, 2014 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    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.
     
    PoPSiCLe, Jul 27, 2014 IP