Initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
include('db.php');
|
||||
if($_POST)
|
||||
{
|
||||
$q=$_POST['search'];
|
||||
$sql_res=mysql_query("select id,name from autocomplete where name like '%$q%' order by id LIMIT 5");
|
||||
while($row=mysql_fetch_array($sql_res))
|
||||
{
|
||||
$username=$row['name'];
|
||||
|
||||
$b_username=$q;
|
||||
$final_username = str_ireplace($q, $b_username, $username);
|
||||
|
||||
?>
|
||||
|
||||
<span class="name"><?php echo $final_username; ?></span> <br/><br/>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user