This is a many-to-many relationship. A user may like a lot of films, and many users may like a movie. In a DBMS, you represent many-to-many relationships with a third table. I call this the intersection table, but it is also called by other names.
Create a table with two columns. Columns are both foreign keys and links to movies and users.
CREATE TABLE Favorites ( user_id INT NOT NULL, movie_id INT NOT NULL, PRIMARY KEY (user_id, movie_id), FOREIGN KEY (user_id) REFERENCES Users(user_id), FOREIGN KEY (movie_id) REFERENCES Movies(movie_id) );
When a user selects a favorite movie:
INSERT INTO Favorites (user_id, movie_id) VALUES (?, ?)
When the user decides that the movie no longer likes, delete the corresponding line:
DELETE FROM Favorites WHERE (user_id, movie_id) = (?, ?)
To get a set of movies approved by this user:
SELECT movie_id FROM Favorites WHERE user_id = ?
To get a set of users who prefer this movie:
SELECT user_id FROM Favorites WHERE movie_id = ?
Regarding one of your comments:
You must not include the "Add to Favorites" link. Indexes like Google will follow the links, and then, before you know it, every user prefers every movie.
It is common practice that read-only operations can be GET requests, and operations that are written to the database can be POST requests. This means that you need to use the <form> element to send POST requests, not the <a href="..."> element.