title: Show certain result with "Genre" Form action
body: <p>I saw the below code by deacs, I tried it and it works splendidly but if the "Genre" row/column contains more than one genre then it doesn't show that result, for example if the genre row only contains "Comedy" then it shows the result, but if it contains "Comedy &amp; Action | Drama" then it doesn't show the result.</p>
  
  <p>I don't have high enough rep so I couldn't comment and ask for the easy fix, anyhow, anybody who can tell me how I can use the code below to show results which contain more than one word/genre?</p>
  
  <pre><code> // get the submitted value
  $genre = $_POST['genre']; 
  
  // set a default genre if the POST genre is empty
  if(empty($genre)) {
      $genre = 'comedy';
  }
  
  // connect to database
  $link = mysqli_connect("localhost", "my_user", "my_password", "db_name");
  
  // check connection
  if (mysqli_connect_errno()) {
      echo "Failed to connect to MySQL: (" . mysqli_connect_errno() . ") ";
  }
  
  // build the query
  $query = "SELECT * FROM movie WHERE genre = '".$genre."'"; // unsafe !!
  
  $query = "SELECT * FROM movie WHERE genre = '".mysqli_real_escape_string($link, $genre)."'"; // safer
  
  // execute query
  $result = mysqli_query($link, $query);
  
  // check result
  if (!$result) {
      echo 'Query unsuccessfull!';
  }
  
  // show values
  while($row = mysqli_fetch_assoc($result)) {
      echo $row['title']; 
      echo $row['description'];
      echo "&lt;br/&gt;";
  }
  
  // close connection
  mysqli_close($link);
  
  
  &lt;form action="display.php" method="POST"&gt;
      &lt;select name="genre"&gt;
          &lt;option value="drama"&gt;Drama&lt;/option&gt;
          &lt;option value="comedy"&gt;Comedy&lt;/option&gt;
          &lt;option value="thriller"&gt;Thriller&lt;/option&gt;
          &lt;option value="horror"&gt;Horror&lt;/option&gt;
      &lt;/select&gt; 
      &lt;input type="submit" value="Submit"/&gt;
  &lt;/form&gt;
  </code></pre>