Ver Mensaje Individual
  #9 (permalink)  
Antiguo 13/11/2013, 15:05
Avatar de nexus44
nexus44
 
Fecha de Ingreso: octubre-2012
Ubicación: Piura
Mensajes: 108
Antigüedad: 11 años, 6 meses
Puntos: 1
Respuesta: Problemas al auto carga datos

Código PHP:
Ver original
  1. <?php
  2.    
  3.    
  4.     if(isset($_POST['ruc']))
  5.    
  6.        
  7.     {
  8.     $ruc    = $_POST['ruc'];
  9.        
  10.     $queEmp = "select * from ventas where ruc='$ruc'";
  11.  
  12.     $resEmp = mysql_query($queEmp,$conexion);
  13.  
  14.     $row = mysql_fetch_array($resEmp);
  15.    
  16.    
  17.  
  18.    }
  19.    
  20.    
  21. ?>

Así queda , pero sin embargo si nos referimos a imprimir. Si esta afuera el html

Código HTML:
Ver original
  1. <html lang="es">
  2.   <head>
  3.  
  4.    <script>
  5.     function enviar_formulario(){
  6.     document.ruc.submit();
  7.     }
  8.    </script>
  9.       <title>CARGAR DATOS</title>
  10.       </head>
  11.       <form action="" name="ruc"  method="post">
  12.       <body>
  13.      <input type="text" name="ruc" id="ruc" value="<?php echo $row['ruc'] ; ?>"  onKeyPress="if (event.keyCode == 13) enviar_formulario()" />
  14.      <input type="text" name="categoria" value="<?php echo $row['categoria'] ; ?>"  />
  15.       </body>    
  16.         </form>
  17.  </html>
__________________

"Nuestra capacidad se aleja de la Humanidad"