<?php 
require('../cfg/res.php');
$bus_sql='select item_codigo,item_descri from item0b where item_buscar like "%'.$_POST['criterio'].'%" and item_carr="1"  GROUP BY item_descri  order by item_descri limit 10 ';
//echo '<option value="'.$bus_sql.'"></option>';
$bus_res=mysql_query($bus_sql,$link_vcrx);
echo '<datalist id="busqueda">';
	if(strpos($user_agent, 'Safari') !== FALSE){
		echo '<select>';	
	}

while($bus_r=mysql_fetch_assoc($bus_res)){
	$user_agent = $_SERVER['HTTP_USER_AGENT'];
	if((strpos($user_agent, 'MSIE') !== FALSE) || (strpos($user_agent, 'Edge') !== FALSE) || (strpos($user_agent, 'Trident') !== FALSE)){
	echo '<option >'.$bus_r['item_descri'].'</option>';
	}
	else{
		echo '<option value="'.$bus_r['item_descri'].'" >'.$bus_r['item_codigo'].'</option>';
	}
}
	if(strpos($user_agent, 'Safari') !== FALSE){
		echo '</select>';	
	}

echo '</datalist>';
?>