How to perform search on the data base table to search for related values in my sql database
<p>I have mysql data base table containing codes of Doctor i want that to search from data base in mysql .
Following codes only gets data by where i want that it should get values from user textbox and then return value</p>

<pre><code>$linkID = mysql_connect($host, $user, $pass)
    or die("Could not connect to host.");

mysql_select_db($database, $linkID)
    or die("Could not find database."); 

$query = mysql_query("SELECT * From ProviderDxCptCodes WHERE CodeType='CPT'");

$rows = array();
while($row = mysql_fetch_assoc($query)) {
    $rows[] = $row;
}
echo json_encode($rows);   
</code></pre>
