Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/01/2010, 17:09
Avatar de JuanSe001
JuanSe001
 
Fecha de Ingreso: diciembre-2009
Mensajes: 46
Antigüedad: 14 años, 4 meses
Puntos: 1
Respuesta: No se por que no me guarda los valores en el Array!!

Muchas Gracias Abimaelrc por tu respuesta.

Te hago una pregunta...si yo para la creacion de los checkbox estoy utilizando un ciclo ahi como seria el name...igual o que? Yo los creo de esta manera.


Código PHP:

<?php
        $numSections
=$_SESSION['numberSections'];
        echo 
$numSections;    
        
$numRows $_SESSION['numberRows'];
        
$numColumns $_SESSION['numberColumns'];
        
$numSeats=$_SESSION['numberSeats'];
        
?>        
        <div style="text-align:center;">
        <form id="formSeatingChart4" name="formSeatingChart4" method="post" action="create_seating_chart5.php" >
        <?php
        
for ($i=0$i $numRows$i++)
        {
            for (
$j=0$j $numColumns$j++)
            {
                
$seats$numColumns;
                
$cont= ($seats*$i)+($j+);
                
        
?>
                <input type="checkbox"  name="CheckBox<?php echo $cont;?>">

        <?php
            
}
            
            echo 
"<br/>";
        }
        
?>        
        <center><input type="button" id="" name="Siguiente" onClick="contarChecks(this.formSeatingChart4)" value="Siguiente"></center>
        </form>
        </div>
        
        <script language="JavaScript">
        function contarChecks() 
        {
            f=document.formSeatingChart4;
            resu = 0;
            for (var i = 0, total = f.elements.length; i < total; i ++)
            {
                if (f.elements[i].type == "checkbox" && f.elements[i].checked)
                {
                    resu ++;
                }    
            }
            f.submit();
        }
        </script>

Gracias por la atencion prestada