Ver Mensaje Individual
  #16 (permalink)  
Antiguo 15/12/2016, 08:25
spark21
 
Fecha de Ingreso: diciembre-2007
Mensajes: 38
Antigüedad: 16 años, 4 meses
Puntos: 1
Respuesta: radio buttom php sql update.

Cita:
Iniciado por rbczgz Ver Mensaje
Hola spark21,

Código PHP:
Ver original
  1. <!--Next events block--> ESTA LÍNEA TE SOBRA, POSIBLEMENTE SEA LA CAUSA DEL ERROR, O POR LO MENOS, DE PARTE DE ÉL.
  2. Lo he escrito con mayúsculas para que resalte, nada más.
  3. <?
  4.  
  5.     mysqlconnect();
  6.  
  7.     if (isset($_POST['active_next'])) {
  8.     $query_next = "UPDATE blocks SET active='$active_next' WHERE content_file='next_events'";
  9.     $result_next = mysql_query($query_next);
  10.     if (!$result_next) error("MySQL Error: ".mysql_error()."\n");
  11.  
  12.     return_do(".?page=blocks", "activated succesfully modified\n$msg");
  13. }else{ ?>
Ya he probado sin el html <!--Next events block-->

si incluyo el return_do(".?page=blocks", "activated succesfully modified\n$msg");
vuelve a salirme el error, cuando la quito no hay error.

Necesito que la variable $active_next no esté vacía para que UPDATE blocks SET active='$active_next' ponga el valor dado por el radiobutton.

Sigo probando lo que voy leyendo por ahí también, a ver si doy con el fallo.