Ver Mensaje Individual
  #25 (permalink)  
Antiguo 06/01/2010, 14:26
mendekua
 
Fecha de Ingreso: noviembre-2009
Ubicación: Abadiño
Mensajes: 21
Antigüedad: 14 años, 5 meses
Puntos: 0
Respuesta: Problema con el uso de varios checkbox

A ver, el checkbox lo recorro en parrilla_videos.php
Código PHP:
<?php
if (is_array($_POST['checkbox'])){
    foreach(
$_POST['checkbox'] as $ip){
        
$dirIP $ip;
    }
}
?>
y luego pongo el hidden
Código HTML:
<input name="dirip" type="hidden" value="<?php echo $_POST['checkbox']; ?>" /> 
le doy al boton de aceptar del formulario parrilla_videos.php y deberia de hacer todo el codigo:
Código PHP:
<?php
if (isset($_POST['aceptar'])){
    
$bat="tienda_".$row_ver_IP['Nombre'].".bat";
    
$txt="ftp_".$row_ver_IP['Nombre'].".txt";
    
$fpBat fopen($bat"a");
    
$fpTxt fopen($txt"a");
    
$string1Bat="ftp -s:ftp_".$row_ver_IP['Nombre'].".txt";
    
$writeBat fputs($fpBat$string1Bat);
    
$string1Txt="open ".$_POST['$dirip']."\r\n";
....
pero sigue sin hacerlo, el checkbox esta recorrido, nose, y si en vez de poner:
if (isset($_POST['aceptar'])){
pongo
if (isset($_POST['enviar'])){ que es el button del formulario parrilla_tiendas.php
me hace todo bien , pero no hace el codigo;
if(!empty($_POST['seleccion'])) {
foreach ($_POST['seleccion'] as $nombrevideo){
$string7Txt="put $nombrevideo\r\n";
$writeTxt = fputs($fpTxt, $string7Txt);
}
}

y ya no se que hacer.
Saludos