Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/10/2008, 14:22
Avatar de Carlojas
Carlojas
 
Fecha de Ingreso: junio-2007
Ubicación: Shikasta
Mensajes: 1.272
Antigüedad: 16 años, 11 meses
Puntos: 49
Respuesta: Modificar datos de MySql

Bueno por partes, primero el código que te listas el ID y Nombres
Código PHP:
<?php 
// si tenemos id de noticia
if(!empty($_GET['id'])) { 
$id $_GET['id']; 
// traemos la noticia 
$query_I "SELECT id,nombres FROM `loccontacta` WHERE id = $id limit 1"
$response mysql_query($query$conn)or die("Error en query $query_I:" .mysql_error() );
$noticia mysql_fetch_assoc($response); } 
?>
<html>
<head>
<title>Formulario de Edición de Noticias</title>
</head>
<body>
<h1>Agregar Nueva Noticia</h1>
<form action="modificar.php" method="post">
<label for="nombres">nombres</label><br />
<input id="nombres" name="nombres" value="<?php echo $noticia['nombres'];?>"type="text" /><br />
<label for="apellidos"></label>
<br />
<button type="submit" name="submit" value="1">Editar Noticia</button>
<input name="id" value="<?php echo $noticia['id'];?>" type="hidden" />
</form>
</body>
</html>
Sigo con la misma inquietud de donde obtienes ese ID? con el cual haces la consulta? $_GET['id'], segura que esa variable esta tomando algun valor? verifica eso, ahora te arroja algún error? ubica estas dos líneas al principio de tu script
Código PHP:
ini_set('error_reporting'E_ALL);
ini_set('display_errors'true); 

Saludos.
__________________
"SELECT * FROM Mujeres WHERE situacion NOT IN ('CASADAS','CON HIJOS','ATORMENTADAS','CUASI-ENNOVIADAS') AND personalidad <> 'INTENSA'"

Última edición por Carlojas; 04/10/2008 a las 15:33