title: Php select * where like
body: <p>Hi I am trying to get a search working for a site. It has 2 inputs for taking in info, one is a dropdown.</p>
  
  <pre><code>&lt;div id="search"&gt;
  &lt;form action="projectsearchall.php" method="post" enctype="multipart/form-data"&gt;
  &lt;h3&gt;Search for an Item&lt;/h3&gt;
  
  &lt;p&gt;Keywords&lt;/p&gt;&lt;p&gt;&lt;input name="keywords" type="text" value="keywords"&gt;&lt;/p&gt;
  
  
  &lt;p&gt;Select A Location&lt;/p&gt;&lt;p&gt;
  
  &lt;select name="location" id="jumpMenu"&gt;
   &lt;option&gt;Any Location&lt;/option&gt;
   &lt;option&gt;Antrim&lt;/option&gt;
   &lt;option&gt;Armagh&lt;/option&gt;
   &lt;option&gt;Carlow&lt;/option&gt;
   &lt;option&gt;Cavan&lt;/option&gt;
  
  
  &lt;/select&gt;
  &lt;/p&gt;
  &lt;p&gt;
  </code></pre>
  
  <p>
      </p></p>
  
  <pre><code>&lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I cannot seem to figure out how to combine the 2 inputs to give a result, I can do it separately, but not working together to get a more accurate result.</p>
  
  <p>php</p>
  
  <pre><code>$keywords = $_POST['keywords'];
  $keylocation =$_POST['location'];
  $username = $_SESSION['username'];
  
     //MySQL Database Connect
   include 'connect.php';
   //make sql query
  
  $result = mysqli_query($con,"SELECT * FROM projectitem where description  like '%$keywords%'  or item like '%$keywords%' or location like '%$keywords%'");
  </code></pre>
  
  <p>Thanks in advance!</p>