title: How to create search BUTTON using PHP
body: <p>I want to create search button to view items from database.</p>
  
  <pre><code>&lt;form  method="post" name="searchdeals"&gt;
                  &lt;h5 class="display-5 text-left py-3"&gt;Find a favourite vehicle &lt;/h5&gt;
                  &lt;div class="form-group select"&gt;
                      &lt;select name="manufacturer_code" id="manufacturer_code" class="form-control" onchange="getState(this.value);"&gt;
                          &lt;option selected&gt;Select Brand&lt;/option&gt;
                          &lt;?php $ret="SELECT * FROM tbl_manufacturer";
                          $query= $dbh -&gt; prepare($ret);
                          $query-&gt; execute();
                          $results = $query -&gt; fetchAll(PDO::FETCH_OBJ);
                          if($query -&gt; rowCount() &gt; 0)
                          {
                              foreach($results as $result)
                              {
                                  ?&gt;
                                  &lt;option value="&lt;?php echo htmlentities($result-&gt;manufacturer_code);?&gt;"&gt;&lt;?php echo htmlentities($result-&gt;manufacturer_name);?&gt;&lt;/option&gt;
                              &lt;?php }} ?&gt;
                      &lt;/select&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group select"&gt;
                      &lt;select name="model_code" id="model_code" class="form-control"&gt;
                          &lt;option selected&gt;Select Model&lt;/option&gt;
                      &lt;/select&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;button type="submit" name="searchdeals" value="Filter" class="btn btn-block btn-warning"&gt;&lt;i class="fa fa-search" aria-hidden="true"&gt;&lt;/i&gt; Search Vehicle&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/form&gt;
  </code></pre>
  
  <p>This is my form to search items. So can suggest to me how to create query and code to create search button.</p>
  
  <p>I know to use LIKE OPERATOR in query, but i don't know to write the code</p>
  
  <p>action.page</p>
  
  <pre><code>if(isset($_POST['searchdeals'])){
  
  $valueToSearch = $_POST['model_code'];
  
  $sql = "SELECT tbl_manufacturer.manufacturer_name, tbl_model.model_name, tbl_model.model_type, tbl_vehicle.*, tbl_company.comp_name
                                      FROM tbl_vehicle
                                      INNER JOIN tbl_company ON tbl_vehicle.comp_id = tbl_company.comp_id
                                      INNER JOIN tbl_model ON tbl_vehicle.model_code = tbl_model.model_code
                                      INNER JOIN tbl_manufacturer ON tbl_model.manufacturer_code = tbl_manufacturer.manufacturer_code";
  $query = $dbh -&gt; prepare($sql);
  $query-&gt;execute();
  $results=$query-&gt;fetchAll(PDO::FETCH_OBJ);
  </code></pre>