Hola:
 
Tengo un problema con esto. Yo tengo un form que recolecta una cantidad de opciones que puede seleccionar el cliente a través de checkbox y su respectiva caja de texto para colocar la cantidad. Lo que seleccione se guarda en una variable de sesion y al final debo mostrar cuales opciones eligio de check y de textbox. Este es el form donde coloca los datos que se alimenta de una bd:    
Código PHP:
Ver original- <form name="form3" action="cotizacion.php?page=cotizacion_3" method="post"> 
- <table width="600"> 
-   <tr> 
-     <td width="300"> 
-   
-  <table width="300"> 
-  <tr> 
- <th colspan="3"><center>Alimentos</center></th> 
- </tr> 
- <?php echo " 
-   <td width=\"150\">Producto</td> 
-   <td width=\"100\">Seleccionar</td>   
-   <td width=\"150\">Cantidad</td>   
-   </tr> 
-   <tr>"; 
-     $rs = mysql_query("SELECT * FROM xxxx where categoria='alimentos'"); 
-     $categoria = $result['categoria']; 
-     $alim = $result['alim']; 
- echo 
- "            
-    <td>$producto_alim</td> 
-    <td><input name=\"alimentos[]\" type=\"checkbox\" value=\"$alim\"></td>  
-    <td><input name=\"ctdad_alimentos[]\" type=\"text\" value=\"\" size=\"3\"></td>     
-    </tr>"; }?> 
-     </table> 
-   
- <td width="300"><table width="300"> 
- <tr> 
- <th colspan="3"><center>Bebidas</center></th> 
- </tr> 
- <?php echo 
- "  
-   <tr> 
-   <td width=\"150\">Producto</td> 
-   <td width=\"100\">Seleccionar</td>   
-   <td width=\"150\">Cantidad</td>   
-   </tr> 
-   <tr>"; 
-     $rs = mysql_query("SELECT * FROM xxxxxx where categoria='bebidas'"); 
-     $categoria = $result['categoria']; 
-     $bebidas = $result['producto']; 
- echo 
- "            
-    <td>$producto_bebidas</td> 
-    <td><input name=\"bebidas[]\" type=\"checkbox\" value=\"$bebidas\"></td>  
-    <td><input name=\"ctdad_bebidas[]\" type=\"text\" value=\"\" size=\"3\"></td>     
-    </tr> 
-   "; 
- } 
- ?> 
-     </table></td></td> 
-   </tr> 
- </table> 
- <label> 
-     <p align="center"> 
-     <input name="regresar" type="button" value="Atras" onclick="location.href='cotizacion.php?page=cotizacion_1'"> 
-     <input name="siguiente" type="submit" value="Siguiente"> 
-         <input name="salir" type="button" value="Salir" onclick="location.href='index2.php'"> 
-     </p> 
-    </label> 
- </form> 
y en este otro muestro lo recolectado con $_SESSION['variables1']=$_POST;:    
Código PHP:
Ver original- <tr> 
-    <td>Alimentos</td> 
-    <td><?php  
-    if (isset($_SESSION['variables1']['alimentos'])) { 
- foreach($_SESSION['variables1']['alimentos'] as $v) 
-   { 
-     echo "<input name=\"alimentos\" value=\"$v\" readonly=\"readonly\">";   
-    echo "<br>"; 
-   } 
-    } 
-   else { 
-        echo "No hay Datos";} 
- ?> </td> 
- <td>Cantidad:</td> 
- <td> 
-    <?php  
-       if (isset($_SESSION['variables1']['ctdad_alimentos'])) { 
-   
-  foreach($_SESSION['variables1']['ctdad_alimentos'] as $v) 
-   { 
-     echo "<input name=\"ctdad_alimentos\" value=\"$v\" readonly=\"readonly\">";   
-    echo "<br>"; 
-   }} 
-    else { 
-        echo "No hay Datos"; 
-        } 
- ?></td> 
-  </tr>   
-  <tr>   
-    <td>Bebidas</td> 
-    <td><?php 
-    if (isset($_SESSION['variables2']['bebidas'])) {  
-  foreach($_SESSION['variables2']['bebidas'] as $v) 
-   { 
-     echo "<input name=\"bebidas[]\" value=\"$v\" readonly=\"readonly\">";   
-    echo "<br>"; 
-   } 
-    } 
-    else { 
-        echo "No hay Datos"; 
-        } 
- ?></td> 
El problema es que como existen 20 categorias de bebidas por ejemplo al mostrar la cantidad me trae todos los input text y no los que el cliente seleccionó. 
He probado de distintas formas pero no se como arreglar esto. 
Por favor pueden darme una ayudita para entender. Gracias.