Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/06/2011, 07:04
Avatar de Triby
Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: Problema con <input value="<?=$variable?>">

Código PHP:
Ver original
  1. function procesar_borrar($form_borrar){
  2.     foreach($form_borrar['id'] as $indice => $valor) {
  3.         $sql = mysql_query("SELECT id FROM comentarios WHERE id = '".$valor."'") or die (mysql_error());
  4.         if($row = mysql_fetch_array($sql))
  5.                 $id = $row['id'];
  6.         if(empty($sql)) {
  7.             $salida = 'Vacio'.$valor;
  8.         } else {
  9.             $salida = "lleno".$valor;
  10.         }
  11.         // ************ Bloque final *************
  12.         // Esta dentro del foreach... solo procesa 1 elemento!!!
  13.         $borrar = new xajaxResponse('ISO-8859-1');
  14.         $borrar->addAssign("comentarioinsertado","innerHTML",$salida);
  15.         return $borrar;
  16.         // ************ Bloque final *************
  17.    }
  18. }
__________________
- León, Guanajuato
- GV-Foto