<?php
include ("connect.php");
$q = strtolower($_GET["q"]);
if (!$q) return;
$result2 = mysql_query("SELECT * FROM supplier";
$line = $db->query($query2);
  while ($line = $db->fetchNextObject()) {
  
  	if (strpos(strtolower($line->stock_name), $q) !== false) {
		echo "$line->stock_name\n";
	
 }
 }

?>