I have a table called contacts
, where each user stores the username of his contacts:
$result = mysql_query("SELECT * FROM contacts WHERE sender='".$_SESSION ["username"]."'");
$row = mysql_fetch_array($result);
My page is used to compose a message to an user. So when a user types in the textfield I need to show a dropdown list matching names from his contacts (as in Gmail).
<input name="reciever" type="text" value="" class="inputs3" placeholder="Enter the username"/>
I searched a lot, but couldn't find any working script.