Hola a todos. Tengo el siguiente formulario no N lineas, necesito validad por cada linea de la tabla principal:
 
* Al marcar un documento(checkbox)  debe validar que bulto sea > 0, o viceversa.
-------------------------------------------------------------------
No necesariamente todas la filas deben ir marcadas.
 
 
<form action="" method="post">
<table width=100% border=1 cellpadding=2 cellspacing=0>
  <tr class=Titulo3 bgcolor=#006600>
    <td width=35% align=center>Documentos</td>
    <td width=40% align=center>Transparte</td>
    <td width=25% align=center>Bultos</td>
  </tr>
 </table>
 <table width=100% border=1 cellpadding=2 cellspacing=0>
 <!-- Fila 1 -->
  <tr class=Titulo2>
    <td width=35%>
     <table width=100% border=0 cellpadding=0 cellspacing=0>
      <tr>
        <td width=30% align=center><input type="checkbox" name="guias" value=4215015></td>
        <td width=70%>4215015</td>
      </tr>
      <tr>
        <td width=30% align=center><input type="checkbox" name="guias" value=4216728></td>
        <td width=70%>4216728</td>
      </tr>
      <tr>
        <td width=30% align=center><input type="checkbox" name="guias" value=1220001></td>
        <td width=70%>1220001</td>
      </tr>
     </table>
    </td>
    <td width=40% align="center" valign="top">
      <select name="codtra">
       <option value=005 selected="selected">Rapid Cargo</option>
       <option value=001>Transp. Romani</option>
       <option value=002>Flores Vival</option>
       <option value=003>Carmelita</option>
       <option value=004>Lit Aereo</option>
       <option value=006>Condor Bus</option>
      </select>
    </td>
    <td width=25% align=center valign=top><input type=text  name="paq"  size=3 maxlength=3 onkeypress="if(event.keyCode < 48 || event.Code > 57) event.returnValue = false;"></td>
  </tr>
  <!-- Fila 2 -->
   <tr class=Titulo2>
    <td width=35%>
     <table width=100% border=0 cellpadding=0 cellspacing=0>
      <tr>
        <td width=30% align=center><input type="checkbox" name="guias" value=4444444></td>
        <td width=70%>4444444</td>
      </tr>
      <tr>
        <td width=30% align=center><input type="checkbox" name="guias" value=2222544></td>
        <td width=70%>2222544</td>
      </tr>
      <tr>
        <td width=30% align=center><input type="checkbox" name="guias" value=5788894></td>
        <td width=70%>5788894</td>
      </tr>
     </table>
    </td>
    <td width=40% align="center" valign="top">
      <select name="codtra">       
       <option value=001 selected="selected">Transp. Romani</option>
       <option value=005>Rapid Cargo</option>
       <option value=002>Flores Vival</option>
       <option value=003>Carmelita</option>
       <option value=004>Lit Aereo</option>
       <option value=006>Condor Bus</option>
      </select>
    </td>
    <td width=25% align=center valign=top><input type=text  name="paq"  size=3 maxlength=3 onkeypress="if(event.keyCode < 48 || event.Code > 57) event.returnValue = false;"></td>
  </tr>
</table><br />
<center><input type="submit" value="Procesar" /></center>
</form>
 
En el action debo extraer:
Los documentos marcados (checkbox) - Transporte y Bultos.
¿Las variables deben ser definidas como array?
¿Como puedo contar las lineas de la tabla principal, para que me sirvan como contador y utilizarlo en el proceso de seleccion?
 
Linea 1 seleccione 4215015-1220001 transporte: 5  y bultos:4
Linea 2 No hubo seleccion
Linea 3 seleccione 4444444-222544-5788894 transporte: 3  y bultos:1
 
 
espero darme a entender.
Desde ya gracias. 
  
 
