<?php
	error_reporting(E_ALL ^ E_DEPRECATED);
	$q=$_GET['q'];
	$my_data=$q;
	require '../../connections/conn.php';
	$sql="SELECT distinct * FROM `treatments` WHERE `treat_name` LIKE '%$my_data%'";
	$result=$conn->query($sql);
	if($result)
	{
		while($row=mysqli_fetch_array($result))
		{
			echo $row['treat_name']."\n";
		}
	}
?>
<?php /*
	error_reporting(E_ALL ^ E_DEPRECATED);

	$q=$_GET['q'];
	$my_data=mysql_real_escape_string($q);
	$mysqli=mysqli_connect('localhost','root','','madkhal') or die("Database Error");
	$sql="SELECT distinct name FROM `insert` WHERE name LIKE '%$my_data%' ORDER BY barcode";
	$result = mysqli_query($mysqli,$sql) or die(mysqli_error());
	
	if($result)
	{
		while($row=mysqli_fetch_array($result))
		{
			echo $row['name']."\n";
		}
	}*/
?>