Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/01/2006, 19:21
Avatar de vivinet
vivinet
 
Fecha de Ingreso: diciembre-2005
Mensajes: 4
Antigüedad: 18 años, 3 meses
Puntos: 0
Algo que me faltó agregar a la consulta... el formulario tiene varios registros, varian de acuerdo al usuario, lo conveniente es que el usuario cuando cargue vaya grabando por registro, porque no me doy cuenta si se puede hacer la consulta para que guarde todos los registros al mismo tiempo, ya que está dentro de un while, y el nombre de la variable se va a repetir N veces.
Va el código
Código PHP:
  print "<center>
  <table border=0 cellpadding=0 cellspacing=0 width=1024>
 <tr width=100%>
  <td>Tarifador</td>
  <td>ID</td>
  <td>Dirección</td>
  <td>Localidad</td>
  <td>N.C.</td>
  <td>Desde</td>
  <td>Hasta</td>
  <td>N.Tickect</td>
  <td>Bruto</td>
  <td>Gastos</td>
  <td> </td>
  <td>Fecha</td>
  <td>Sucursal</td>
  <td>Efectivo</td>
  <td>Frances</td>
 </tr>"
;
  
$queryst "SELECT * FROM sp.planilla WHERE id_puntero = '$ID_p' ORDER BY id_planilla";
     
$total 0;
     
$i=0;

     
$query=mysql_query($queryst);
    while(
$row=mysql_fetch_array($query))
    {
        
$i++;
        
$tarifador$row[2];
        
$ID$row[0];
        
$direc$row[3];
        
$localidad$row[4];
        
$contrato$row[5];
        print 
" <tr width=100%>
          <td>$tarifador </td>
          <td> $ID</td>
          <td>$direc </td>
          <td>$localidad </td>
          <td>$contrato </td>
          <td><input name=fecha_desde type=text size=10 maxlength=10></td>
          <td><input name=fecha_hasta type=text size=10 maxlength=10></td>
          <td><input name=ticket type=text size=5 maxlength=10></td>
          <td><input name=ing_bruto type=text value=$0,00 size=8 maxlength=8></td>
          <td><input name=gastos type=text value=$0,00 size=8 maxlength=8></td>
          <td>&nbsp;</td>
          <td><input name=fecha_depos type=text size=10 maxlength=10></td>
          <td><input name=sucursal type=text size=8 maxlength=8></td>
          <td><input name=efectivo type=text value=$0,00 size=8 maxlength=8></td>
          <td><input name=depos_bco type=text value=$0,00 size=8 maxlength=8></td>
         </tr>"
;
     }
 print 
"</table>
    <input name=Guardar type=submit>"