G
G
GuZzy2018-03-15 11:34:34
JavaScript
GuZzy, 2018-03-15 11:34:34

How to implement "Like" feature of Ionic 3, MySQL?

Hello, I'm new to javascript, I'm making a mobile application for Cafes.
I take all the data from the MySql database using PHP.
I have an "Events" database that contains a Photo, price and date of the event.
I get records in this format:
File home.ts

this.http.get('http://*************/admin/api/mob/select-event.php')
    .subscribe((data) =>
    {
       console.dir(data);
       this.events = data;
    },
    (error) =>
    {
       console.dir(error);
    });

The application has its own authorization, in the same home.ts file I get the ID of the authorized user.
Now the question is how to implement the "Like" button. So that when you click the like is added, or if you click again, then it is taken away?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question