<?php
include "config.php";

$q = $_GET['q'];

$result = mysqli_query($conn,
"SELECT medicine_name, strength 
 FROM medicines 
 WHERE medicine_name LIKE '%$q%' 
 ORDER BY medicine_name ASC 
 LIMIT 10");

while($row = mysqli_fetch_assoc($result)){

$full = $row['medicine_name']." ".$row['strength'];

echo "<div class='suggest-item' onclick='selectMed(this)'>
$full
</div>";

}
?>