title: How to query search result from mysql table?
body: <p>I have made a product uploading from and it works successfully. But now I want to create a search form so that anyone can show result by searching product title or category or price. My table contains title, price, description, category column.</p>
  
  <p>My code is not working. I am not sure how to do it right way. When I wanted to add more column it is not working. I am definitely not sure what is the wrong or what should I need to do.</p>
  
  <p>Here is my code for product searching:</p>
  
  <pre><code> &lt;?php
  
   // Connects to your Database 
           mysql_connect("localhost", "root", "") or die(mysql_error()) ; 
           mysql_select_db("product") or die(mysql_error()) ; 
           $search =$_POST['search'];
      $data = mysql_query("SELECT * FROM manage WHERE title or category and price= '$search' ") or die(mysql_error()); 
  
      //Puts it into an array 
       while($info = mysql_fetch_array( $data )) {
       //Outputs the image and other data 
       echo "&lt;img src=http://localhost/hasem/exresze/images/".$info['photo'] ."&gt; &lt;br&gt;"; Echo "&lt;b&gt;Title:&lt;/b&gt; ".$info['title'] . "&lt;br&gt; "; Echo "&lt;b&gt;Description:&lt;/b&gt; ".$info['description'] . " &lt;br&gt;"; Echo "&lt;b&gt;Category:&lt;/b&gt; ".$info['category'] . " &lt;hr&gt;"; }
  
       ?&gt; 
  
      &lt;form action="search_product.php" method="POST"&gt;
      &lt;input type="text" name="search"&gt;
      &lt;input type="submit" value="Search" /&gt;
      &lt;/form&gt;
       ?&gt; 
  </code></pre>
  
  <p>I have tried many time to get result by putting more column name into my query code but not working. It only supports two columns . Please give me a perfect idea so that i can get it proper way. Please don't mind i am new to this field.This query code works fine</p>
  
  <pre><code>$data = mysql_query("SELECT * FROM manage WHERE title or category = '$search' ") or die(mysql_error()); 
  </code></pre>