Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/11/2009, 18:51
makh16
 
Fecha de Ingreso: enero-2009
Mensajes: 213
Antigüedad: 16 años
Puntos: 0
Respuesta: problema con update + html

El codigo es el siguiente:
Código:
<?php
if ($_POST["titulo"]&&$_POST["cuerpo"]&&$_POST["autor"]&&$_POST["categoria"])
{
	$titulo=$_POST["titulo"];
	$cuerpo=$_POST["cuerpo"];
	$foto=$_POST["foto"];
	$autor=$_POST["autor"];
	$categoria=$_POST["categoria"];
	$fecha=time();
	
$link = mysql_connect("", "",""); 
mysql_select_db("", $link);
$sql = "UPDATE noticias SET titulo='".$titulo."',cuerpo='".$cuerpo."',foto='".$foto."',autor='".$autor."',categoria='".$categoria."' where id='".$id."'";
$result = mysql_query($sql,$link);
mysql_close($link);
echo "<font color='#FFF'>La notícia se ha editado correctamente.</font>";
}
?>