How to use the textbox value to fetch the records and to display it in the same page
<pre><code>  i am having a Form like


  &lt;script language="javascript" type="text/javascript"&gt;

     function formfn()
  {
   var str = document.getElementById('TitleSearch').value;
  alert(str);//displays the keyword like database
   }

   &lt;/script&gt;






  &lt;form name="f1" method="post"&gt;
   &lt;p&gt;&lt;label for="TitleSearch"&gt;Keywords:&lt;/label&gt; 
   &lt;input title="Keyword" size="40" value="" id="TitleSearch"&gt;&lt;/p&gt; 
   &lt;p&gt;
   &lt;input type="submit" id="im-search" value="Search" name="im-search" onClick="formfn();"&gt;&lt;/p&gt;
      &lt;/form&gt;
</code></pre>

<p>I am having a page where in the top i have this form on search it has to take the value of the textbox TitleSearch and to use this to retrieve the records matching by</p>

<pre><code>      &lt;?php
$db         =&amp; JFactory::getDBO();
    $query =  'SELECT * from #__chronoforms_Publications where keyword like "%valueretrieved%" ';
    $db-&gt;setQuery($query);
    $rows = $db-&gt;loadObjectList();
      //echo $rows;
      ?&gt;
</code></pre>

<p>Once the search button is clicked the text box value of the keyword is retrieved .
I am trying to use this value in the select query to fetch the records and to display in the same page.. </p>

<p>How to do so..</p>
