<?

session_start();

include("../include/db.inc.php");

include("../include/bit_functions.inc.php");

	$db1=new db;

	$db1->open();

	



if(isset($_GET['uname']) && isset($_GET['letters'])){

	$letters = $_GET['letters'];

	

	$res = mysql_query("select distinct(uname) from user where uname like '%".$letters."%'") or die(mysql_error());

	

	

	while($inf = mysql_fetch_array($res))

	{

	

	 $string = substr($inf["uname"],0,20);

     $pattern = $letters;

     $replacement = "<span style='background-color:#000; color:#fff; font-weight:bold'><b>".$letters."</b></span>";

     

	     $str= str_ireplace($pattern, $replacement, $string);		

		

		echo "###".$str."|";

	}	

}





?>

