<?php
$id = $_POST['id'];
$titulo = $_POST['titulo'];
$noticia = nl2br($_POST['noticia']);
$fecha = $_POST['fecha'];
require('conexion2.php');
mysql_query("update noticias SET titulo = '$titulo', noticia = '$noticia', fecha= '$fecha' where id = $id");
echo'<script>
alert("Los datos han sido actualizados correctamente.")
self.location="noticias.php"
</script>';
?>