bueno mi problema es el siguiente tengo un formulario
Código HTML:
<form action="noticia.php" method="post"> <strong> Autor:<br> <input type="text" name="autor"><br> titulo:<br> <input type="text" name="titulo"><br> email:<br> <input type="text" name="email"><br> introduccion:<br> <input type="text" name="introduccion"><br> NOTICIA:<br> <textarea name="comentario" rows="7" cols="25"></textarea><br><br> <input type="hidden" name="id" value="<?php echo $_GET['i']; ?>"> <input type="hidden" name="topic" > <input type="submit" name="enviar" value="enviar noticia"> </form>
Código PHP:
<?php
include("config.php");
$autor = $_POST['autor'];
$noticia = $_POST['noticia'];
$titulo = $_POST['titulo'];
$email = $_POST['email'];
$introduccion = $_POST['introduccion'];
$id = $_POST['id'];
$fecha = time();
mysql_query("INSERT INTO noticias (id,fecha, autor,titulo, email, introduccion, noticia) VALUES ('".$id."';'".$fecha."';'".$autor."';'".$titutlo."','".$email."';'".$introduccion."';'".$noticia."')") or die ("error:\n".mysql_error());
?>
y me sale este error:
Cita:
en q podria estar fallado? error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';'1174667356';'dereki';'','[email protected] ';'introduccion 5';'')' at line 1