Creating a php search bar
<p>I want to put a search box so that when you type in a persons name it selects that persons details from the database.</p>

<p>This is my search box
    
    </p>

<pre><code>&lt;form action="users.php" method="GET"&gt;
&lt;input id="search" type="text" placeholder="Type here"&gt;
&lt;input id="submit" type="submit" value="Search"&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Then here is my php to return the users</p>

<pre><code>&lt;?php 

$connection = mysql_connect("localhost","root","");

mysql_select_db("blog1")or die(mysql_error());


$result = mysql_query("SELECT username FROM member");
 while ($row = mysql_fetch_assoc($result)) {
echo "&lt;div id='link' onClick='addText(\"".$row['username']."\");'&gt;" . $row['username'] . "&lt;/div&gt;";  
 }


  ?&gt;
</code></pre>

<p>How do get it to just return the user that i type in the search bar instead of all the users. any help would be great as i am just learning php.</p>
