Search Criteria in PHP
<p>JAVASCRIPT</p>

<pre><code>function ShowContent(id) {
if(id.length &lt; 1) { return; }
document.getElementById(id).style.display = "block";
}
</code></pre>

<p>PHP</p>

<pre><code>$test = mysql_query('SELECT userid,testid,testname FROM test_table WHERE userid = 9 ORDER BY name');
TestName : &lt;select&gt;
             while($row=mysql_fetch_array($test))
             {
                $testname = $row['testname']; 
                $testid   = $row['testid'];
                echo '&lt;option value='.$testid.'&gt;'.$testname.'&lt;/option&gt;
             }
           &lt;/select&gt;
   echo '&lt;div id="testid" style="display:none;"&gt;
      echo '&lt;table&gt;
             &lt;tr&gt;&lt;th&gt;USERID&lt;/th&lt;/tr&gt;
             &lt;tr&gt;&lt;th&gt;TESTNAME&lt;/th&gt;&lt;/tr&gt; 
             &lt;tr&gt;&lt;th&gt;MARKS&lt;/th&gt;&lt;/tr&gt;
      publishtest = mysql_query('SELECT id,userid,publishtest,marks FROM publish_table WHERE userid= 9 GROUP BY id');
      while($row=mysql_fetch_array($publishtest))
      {
        $userid = $row['userid'];
        $testid = $row['id']; /*This is test id*/
        $testname = $row['publishtest']; /* This is test name*/
        $marks = $row['marks'];
        echo '&lt;tr&gt;&lt;td&gt;'.$userid.'&lt;/td&gt;
                &lt;td&gt;'.testid.'&lt;/td&gt;
                &lt;td&gt;'.testname.'&lt;/td&gt;
                &lt;td&gt;'.$marks.'&lt;/td&gt;
            &lt;/tr&gt; 
      }
        echo '&lt;/table&gt;';
        echo '&lt;/div&gt;';
</code></pre>

<p>I need when I select test from select tag, then div should be displayed of that testid. I want either in javascript, jquery</p>
