El error lo encuentro al cambiar el campo vista desde el formulario. Puedo cambiar todos los campos del formulario excepto vista. Cuando intento cambiarlo, recarga la página que es lo que hace con todos los demás y me devuelve el "NO". A que se peude deber? Será que por el juego de registros?
Agradecería todo en lo que me pudieran ayudar, saludos,
Marcos.
Código:
<?php require_once('../../Connections/musica.php'); ?> <?php mysql_select_db($database_musica, $musica); $query_bandas = "SELECT * FROM bandas WHERE vista = 'NO'"; $bandas = mysql_query($query_bandas, $musica) or die(mysql_error()); $row_bandas = mysql_fetch_assoc($bandas); $totalRows_bandas = mysql_num_rows($bandas); ?> <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "bnd")) { $updateSQL = sprintf("UPDATE bandas SET web=%s, género=%s, mail=%s, integrantes=%s, texto=%s, otros=%s, vista=%s, mensaje_e=%s WHERE banda=%s", GetSQLValueString($_POST['web'], "text"), GetSQLValueString($_POST['genero'], "text"), GetSQLValueString($_POST['integrantes'], "text"), GetSQLValueString($_POST['texto'], "text"), GetSQLValueString($_POST['otra'], "text"), GetSQLValueString($_POST['vista'], "text"), GetSQLValueString($_POST['mensaje_e'], "text"), GetSQLValueString($_POST['banda'], "text"), GetSQLValueString($_POST['mail'], "text")); mysql_select_db($database_musica, $musica); $Result1 = mysql_query($updateSQL, $musica) or die(mysql_error()); } ?>