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;
}
}
}