ده الكود اللى كتبته ملاحظاتكم ومساعدتكم

<?php

$localhost="localhost";

$db_user="root";

$db_password="root";

$db_name="first database";

mysql_connect($localhost,$db_user,$db_password);

mysql_select_db($db_name);

$word=$_POST['search'];

$sql="select * from users where first like '%$word%'"; // serach 0:9 and a:z

$query=mysql_query($sql);

while($row=mysql_fetch_array($query)){

echo"id:".$row['id'];

echo"username:".$row['username'];

echo"email:".$row['email'];

}

?>