Tema: chek no anda
Ver Mensaje Individual
  #6 (permalink)  
Antiguo 08/02/2011, 13:14
Avatar de Nano_
Nano_
 
Fecha de Ingreso: febrero-2006
Ubicación: Bogotá, Colombia
Mensajes: 1.866
Antigüedad: 18 años, 2 meses
Puntos: 96
Respuesta: chek no anda

Saludos

Revisa los comentarios que te indico en el código!
Código PHP:
<?php
while ($registro mysql_fetch_array($resultado)) {

    echo 
"<tr>";

    echo 
"<td>";

    echo 
$registro['titulos'];
    echo 
"</td>";
    echo 
"<td>";
    echo 
$registro['parrafos'];
    echo 
"<td width='50'><input type='radio' value='onn'  name=" $registro['id'] . ">on</td><td width='50'><input type='radio' value='off' name=" $registro['id'] . ">off</td>";
    
//Maneja comillas sencillas en los name
    //Donde esta el form?? Esto es todo el fomulario?
    
}
$registro mysql_fetch_array($resultado);//Por que repites esta parte del codigo
$rows mysql_num_rows($resultado);
echo 
"<br/><input type='submit' name='ace' value='Aceptar'>";
?>


</td></tr></table> 
<?php
if (isset($_POST['ace'])) {
    
mifuncion();
}

function 
mifuncion() {
    echo 
"si se presiono";
    
//$rows que es???
    
for ($i 0$i $rows$i++) {
        if (isset(
$_POST[$i])) {//Esto esta mal
            
echo "Se ha presionado el boton radio.$i.<br/>";

            echo 
"tambien se preciono el radio con name 1";
            echo 
$i;
        }
    }
}
__________________
:.:Nano.:: @nano_hard - Retornando al foro