El código no me actúa, al presionar el formulario no actúa en el servidor, se queda en la página;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Enviar noticia - Noticias mixers</title>
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
}
.Estilo1 {
color: #CC0000;
font-weight: bold;
}
a:link {
color: #DA5903;
}
a:visited {
color: #DA5903;
}
a:hover {
color: #DA5903;
}
a:active {
color: #DA5903;
}
.Estilo2 {
color: #FF0000;
font-weight: bold;
}
.Estilo4 {color: #CC0000}
.Estilo6 {color: #000000}
-->
</style></head>
<body>
<p>
<script language="JavaScript" type="text/javascript" src="click.js"></script>
</p>
<table width="98" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="98"><img src="img/news_arriba_mix.gif" width="241" height="40" /></td>
</tr>
<tr>
<td background="img/news_centro_mix.gif" style=""><table width="230" height="36" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td width="215"><p><strong>22-11-07</strong> <span class="Estilo4"><strong><strong>Enviar noticias</strong><b><img src="img/new.gif" width="21" height="9" /></b><br />
</strong><span class="Estilo6"> Enviar noticias del sistema. <br> Autor: <br><input type="text" name="autor"><br>Email del autor: <br> <input type="text" name="autormail"><br>Titulo de la noticia: <br> <input type="text" name="titulo"><br>Noticia: <br> <textarea name="noticiaescrita"></textarea><br><input type="submit" value="Enviar noticia" name="enviar"><br><br>
<?
include("conectar.php");
$autor = $_POST['autor'];
$titulo = $_POST['titulo'];
$autormail = $_POST['autoramail'];
$noticiaescrita = $_POST['noticiaescrita'];
$fecha = date("d-m-Y");
$noticia = '<td width="215"><p><strong>' .$fecha. ' enviada por <b><a href='.$autormail.'>'.$autor. ' </strong> <span class="Estilo4"><strong><strong>' .$titulo. ' </strong><b><img src="img/new.gif" width="21" height="9" /></b><br /></strong>';
$noticia .= '<span class="Estilo6">' .$noticiaescrita. '</p>';
$noticia .= '<br><br>';
$sql = "INSERT INTO `noticiasmix` (noticia) VALUES ('".$noticia."');";
if($_POST['enviar']) {
if(mysql_query($sql)) {
echo "Noticia enviada con éxito!";
} else {
echo "La noticia no se pudo enviar.";
}
}
?><br><br><br>
<p align="center">Sistema noticias en php by <strong>JuankoX</strong> <br />
Administración</p></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="img/news_abajo_mix.gif" width="241" height="11" /></td>
</tr>
</table>
</body>
</html>
HELP ME! IT'S TOO URGENTE!
MODIFICADO:
Perdón, ya lo solucioné, olvidé ponerle el formulario al código, pueden cerrar el tema 