title: Having trouble with my simple search engine
body: <p>I'm having problems with my search engine... I followed a tutorial online, but i doesn't print anything from my database - And yes, I already checked if im connected to the database. 
  Can you help me out? :)</p>
  
  <pre><code>  &lt;?php  
   session_start();  
  $connect = mysqli_connect("localhost", "root", '', "test"); 
  $connect = new mysqli("localhost", "root", "", "test");
  $connect-&gt;set_charset("utf8");
  
  
  if(isset($_GET['name'])) {
  
      $name = $test-&gt;escape_string($_GET['name']);
  
      $query = $test-&gt;query("
      SELECT name, price
      FROM tbl_product
      WHERE name LIKE '%[$name]%'
      OR price LIKE '%{$name}%'
      ")
          ?&gt;
  
  &lt;div class="result-count"&gt;
      Fandt &lt;?php echo $query-&gt;num_rows; ?&gt; resultater.
  &lt;/div&gt;
  
  &lt;?php 
  
      if($query-&gt;num_rows) {
          while ($r = $query-&gt;fetch_object()) {
          ?&gt;
  
          &lt;div class="result"&gt;
              &lt;a href="#"&gt;&lt;?php echo $r-&gt;name; ?&gt;&lt;/a&gt;
          &lt;/div&gt;
  
  &lt;?php
          }
      }    
  }
  </code></pre>
  
  <p>And my database looks like this:  </p>
  
  <p><a href="https://i.stack.imgur.com/trmzQ.png" rel="nofollow noreferrer">enter image description here</a></p>