Tema: chek no anda
Ver Mensaje Individual
  #8 (permalink)  
Antiguo 08/02/2011, 13:23
Avatar de juan_14nob
juan_14nob
 
Fecha de Ingreso: abril-2010
Mensajes: 552
Antigüedad: 14 años
Puntos: 6
Respuesta: chek no anda

ahi te dejo el codigo entero...
Código PHP:
<html>
<head>

</head>
<body>
<?php $conexion mysql_connect("localhost""root""") or die("Problemas en la conexion");
mysql_select_db("roberto"$conexion) or die ("Problema al seleccionar bd");



$strselect="select * from home ORDER BY id asc LIMIT 6";
$resultado=mysql_query($strselect,$conexion);

?><form action='archimodel.php' method='POST'>
<table cellspacing='0' cellpading='0' border='1' width='500'> 

<tr>
<td>
<b>Titulo</b>
</td>
<td>
<b>Parrafos<b/>
</td></tr>
<?php
$rows 
mysql_num_rows($resultado);
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>";

}
$registro mysql_fetch_array($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";

for(
$i=1$i<$rows$i++){
if (isset(
$_POST[$i])){


echo 
"tambien se preciono el radio con name";
echo 
$i;
echo 
"<br/>";
}}}
?>
</form>
<a href="archiprin.php">agree more</a> 
</body>
</html>