Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/06/2004, 06:42
Avatar de Torus
Torus
 
Fecha de Ingreso: enero-2002
Ubicación: Tú buscame y me encontraras
Mensajes: 413
Antigüedad: 22 años, 4 meses
Puntos: 0
Hola RsOfT
esto te puede ayudar

Código PHP:
<html>
<head>
<?
if (isset($Submit))  {
foreach (
$_POST['seleccion'] as $id){ 
   echo 
$id."<br>"

 }
if (isset(
$sube))  {
unset (
$sube); 
$valor=$_POST["valor"];
$vector=$_POST["vector"];

      for(
$i=0;$i<count($valor);$i++){
          if (isset(
$vector[$i])){
             if(
$vector[$i]=="on") {
echo (
"seleccionaste ".$valor[$i]);
         }
     }
  }
}
?>

</head>
<body>
<form name="form1" method="post" action="a_la_misma_pagina.php">
<?
    $vector
=array('opcion1','opcion2','opcion3');
      for(
$i=0;$i<count($vector);$i++){
echo 
$vector[$i];

?>

  <input type="hidden" name ="valor[<? echo ($i);?>]" value="<? echo "$vector[$i]"?>">
  <input type="checkbox" name ="vector[<? echo $i?>]">
 
  <?
}
?>
<input type="hidden" name ="nombre_eviar" value="1">
  <input type="submit" name="sube" > 

</form>

</body>
</html>
Saludos
__________________
Hay tanto que aprender y tan poco tiempo