<?PHP 
require "conecta.php";
$cod=$_GET['cod'];
$sql="select m07001.COD_INTERNO,m07001.GLOSA,m07001.PRECIO,m07005.STOCK FROM m07001 INNER JOIN m07005 ON m07001.COD_INTERNO = m07005.COD_INTERNO
WHERE m07001.COD_INTERNO='$cod';";
$res=mysql_query($sql,$con) or die(mysql_error());
while ($fila=mysql_fetch_row($res)){
 $interno=$fila[0];
 $glosa=$fila[1];
 $precio=$fila[2];
 $stock=$fila[3];
}//wend
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Estilo1 {
	font-size: 18px;
	font-weight: bold;
}
.Estilo2 {font-size: 24px}
.Estilo3 {font-size: 16px}
-->
</style>
</head>

<body>
<form name="form1" method="post" action="">
  <table width="582" height="263" border="1">
    <tr>
      <td colspan="2"><div align="center" class="Estilo1">
        <div align="right" class="Estilo2">
          <div align="center" class="Estilo3">EXISTENCIA EN LOCAL 2 </div>
        </div>
      </div></td>
    </tr>
    <tr>
      <td width="91"><strong>C&oacute;digo</strong></td>
      <td width="475"><input name="codigo" type="text" id="codigo" value="<?php echo $interno ?>"></td>
    </tr>
    <tr>
      <td><strong>Glosa</strong></td>
      <td><input name="glosa" type="text" id="glosa" size="70" value="<?php echo $glosa ?>"></td>
    </tr>
    <tr>
      <td><strong>Precio</strong></td>
      <td><input name="precio" type="text" id="precio" size="10" maxlength="10" value="<?php echo number_format($precio,0,".",",") ?>"></td>
    </tr>
    <tr>
      <td><strong>Stock</strong></td>
      <td><input name="stock" type="text" id="stock" size="10" maxlength="10" value="<?php echo $stock ?>"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
<?php mysql_close($con) ?>
</body>
</html>
