I\'m trying to develop a media website and from my search results, I want to be
ID: 3647572 • Letter: I
Question
I'm trying to develop a media website and from my search results, I want to be able to add certain media to a list. So for example, I search for a movie, and I get all the specific details for that movie if my search is narrow enough. This is my search engine query, and how it displays the result.
$sql = mysql_query("SELECT * FROM movie WHERE title LIKE'%$term%' OR director LIKE '%$term%' OR genre LIKE '%$term%'");
while ($row = mysql_fetch_array($sql)){
echo '<br/><br/>';
echo 'Title: '.$row['title'];
echo '<br/> Director: '.$row['director'];
echo '<br/> Date Released: '.$row['date_released'];
echo '<br/> Genre: '.$row['genre'];
echo '<br/> Running Time: '.$row['running_time'];
echo '<br/><br/>';
echo '<img src="data:image/jprg;base64,'.base64_encode($row['image'] ).'"/>';
if ($_SESSION["logged"]) {
With this code so far, if a user is logged in and completes a search, the user is allowed to now do something else. What I want to be able to do for each search result, is have a option under it to add that movie to another database specific to the user. This database would the list of movies the user has watched. So basically, what I want to do is have an option after each search result saying "Add this movie to your List", and when you click on it would update that specific user list with that movie title. How would I go about doing this?
Explanation / Answer
No answer text found in this record.