Advertisement
Guest User

Untitled

a guest
Feb 7th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. $host = "localhost";
  2. $user = "root";
  3. $password = "";
  4. $db = "images";
  5.  
  6. $conn=mysqli_connect($host, $user, $password, $db);
  7.  
  8. if(!empty($_GET['q'])){
  9.  
  10. $q = $_GET['q'];
  11. $query = "SELECT * FROM names WHERE names like '%$q%'";
  12. $result = mysqli_query($conn, $query);
  13. while($row = mysqli_fetch_assoc($result)){
  14.  
  15. $name = $row['names'];
  16.  
  17. echo '<a href=..........><div class="searchoutput">'.$name.'</a><br><div class="col-md-8"></div></div>';
  18.  
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement