<?php session_start();
require('../cfg/res.php');
$ext_sql='select *, right(item_codigo,2)as ext from item0 where item_codigo like "'.$_POST['idx'].'%"';
$ext_res=mysql_query($ext_sql,$link_vcrx);
?>
<table>
<tr>
	<th>CODIGO</th>
    <th>EXT</th>
</tr>
<?php
while($ext_r=mysql_fetch_assoc($ext_res)){
?>
<tr>
	<td><?php echo $ext_r['item_codigo'];?></td>
    <td><?php echo $ext_r['ext'];?></td>
</tr>
<?php }?>
</table>