Ver Mensaje Individual
  #17 (permalink)  
Antiguo 09/01/2013, 13:04
Avatar de Briss
Briss
 
Fecha de Ingreso: junio-2011
Mensajes: 1.293
Antigüedad: 12 años, 10 meses
Puntos: 12
Respuesta: Actualizar varios registros mediante checkbox

Update productos SET estado='' WHERE id IN (1a,2a,3a)
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\....php:97) line 108

Código PHP:
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {

$aprobar $_REQUEST['aprobar'];
$aprobarimplode(','$aprobar); 
                 
$estado$_POST['idg'][$i];
                
                
                
            
$query=mysql_query("Update productos SET estado='$estado' WHERE  id IN ($aprobar)");
                      
echo 
"Update productos SET estado='$estado' WHERE  id IN ($aprobar)";
                       
  
mysql_select_db($database_connection$connection);


  
$updateGoTo "tsu.php";
  if (isset(
$_SERVER['QUERY_STRING'])) {
    
$updateGoTo .= (strpos($updateGoTo'?')) ? "&" "?";
    
$updateGoTo .= $_SERVER['QUERY_STRING'];
  }    
   
  
header(sprintf("Location: %s"$updateGoTo));/*esta linea es la 108*/