title: Binding in php with postgres
body: <p>I have problem with bindings, I want to insert name or surname in label Pisatelj as keyword to search for this author, 
  I want also do the same way if I insert keyword for Naslov(=Title of book)
  please correct my code 
  I have this code in php with postgres:</p>
  
  <pre><code>function get_knjige_sql ( )
  {
      global $CRUD;
      $dbh = $CRUD['dbh'];
          $str_query = '';
          if(isset($_POST['Knaslov'])){
                  $str_query = addslashes($_POST['Knaslov']);
          }
          if(isset($_POST['Ppriimek'])){
                  $str_query = addslashes($_POST['Ppriimek']);
          } 
  
      $query = " SELECT *  FROM knjiga, pisatelj, zaloga WHERE (knjiga.naslov ILIKE '?' OR CONCAT(pisatelj.ime, ' ', pisatelj.priimek) ILIKE '?' ) AND knjiga.p_id = pisatelj.p_id AND knjiga.k_id = zaloga.k_id AND zaloga.prodana = false ";
      if($sth)
      $sth-&gt;bindValue(':Knaslov', $Knaslov, PDO::PARAM_STR);
      $sth-&gt;bindValue(':Ppriimek', $Ppriimek, PDO::PARAM_STR);
      if($sth)
      $sth-&gt;execute();
  
      else error('get_knjige_sql: select prepare returned no statement handle');
  
      $err = $sth-&gt;errorInfo();
      if($err[0] != 0) error( $err[2] );
  
      return($sth);
  }
  </code></pre>
  
  <h3>main.php:</h3>
  
  <pre><code>&lt;!-- main html file for CRUD (php version) --&gt;
  &lt;?php echo $CRUD["MESSAGES"] ?&gt;&lt;?php echo $CRUD["ERRORS"] ?&gt;
  &lt;div class="form"&gt;
  &lt;form action="&lt;?php echo $CRUD["SELF"] ?&gt;" method="post" name="knjiga"&gt;
      &lt;p class="subheading"&gt;&lt;?php echo $CRUD["FORM_HEAD"] ?&gt;&lt;/p&gt;
  
      &lt;table class="form"&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;p class="Afield"&gt; Naslov:&lt;/p&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input class="Afield" type="text" name="Knaslov" value="&lt;?php echo $CRUD["Knaslov"] ?&gt;"&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;p class="Afield"&gt; Isbn:&lt;/p&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input class="Afield" type="text" name="kisbn" value="&lt;?php echo $CRUD["Kisbn"] ?&gt;"&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;p class="Afield"&gt; Cena:&lt;/p&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input class="Afield" type="text" name="Kcena" value="&lt;?php echo $CRUD["Kcena"] ?&gt;"&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;p class="Afield"&gt; Pisatelj:&lt;/p&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input class="Afield" type="text" name="Ppriimek" value="&lt;?php echo $CRUD["Pime"] ?&gt;&lt;?php echo $CRUD["Ppriimek"] ?&gt;"&gt; &lt;/td&gt;
  
      &lt;/tr&gt;
  
      &lt;tr class="buttons"&gt;&lt;td colspan="2"&gt;
  &lt;p class="buttons"&gt;
  &lt;?php echo $CRUD["BUTTONS"] ?&gt;&lt;?php echo $CRUD["HIDDENS"] ?&gt;
  &lt;/p&gt;
      &lt;/td&gt;&lt;/tr&gt;
      &lt;/table&gt;
  
  
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;?php echo $CRUD["PRECONTENT"] ?&gt;&lt;?php echo $CRUD["CONTENT"] ?&gt;&lt;?php echo $CRUD["POSTCONTENT"] ?&gt;
  </code></pre>