Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/03/2007, 10:32
pavelinhos
 
Fecha de Ingreso: diciembre-2005
Mensajes: 97
Antigüedad: 18 años, 4 meses
Puntos: 0
insertar registro a base de datos

saludos:
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> 
y tengo este archivo noticia.php
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());
?>
el detalle esta en q no realiza la inserccion de los registros a mi BD:
y me sale este error:
Cita:
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
en q podria estar fallado?