Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/10/2008, 09:04
Avatar de karlic0s
karlic0s
 
Fecha de Ingreso: abril-2007
Ubicación: Cartagena (Murcia)
Mensajes: 241
Antigüedad: 17 años
Puntos: 18
Error en el típico sistema de noticias ¬¬

Bueno, cuando solucione todos los errores prometo hacer un aporte en forosdelweb de este sistema de noticias que esta por todos sitios pero no funciona en ninguno, ya que he visto a muchisimos usuarios preguntando por el mismo tema y yo soy uno de los que se unen al club.

Aquí va mi pregunta, tengo este error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\prueba\editar.php on line 9

y éste es el código:

Código PHP:
<?php

$id
=$_GET[id];

$connect=mysql_connect("localhost","root","password")';

mysql_select_db("bd",$connect);

$result=mysql_query("select * from noticias where id_noticia='
$id'",$connect);

while($row=mysql_fetch_array($result))
{
echo '
<form action="edit.php" method="post">
<
input type="hidden" name="id" value="'.$row[id_noticia].'"><br>
T&#237;tulo noticia:<br>
<input type="text" name="titulo" value="'.$row[titulo].'"><br>
Autor:<br>
<
input type="text" name="autor" value=".$row[autor].'"><br>
Categor&#237;a:<br>
<input type="text" name="categoria" value='.$row[categoria].'"><br>
Escriba el articulo<br>
<textarea name="
articulo" cols="50" rows="10">'.$row[articulo].'</textarea>
<br>
< input type="
submit" value="Editar"><br>
</form>
}
mysql_free_result($result)
mysq_close($connect)
?>

Y aquí la línea 9:
Código PHP:
$result=mysql_query("select * from noticias where id_noticia='$id'",$connect); 

Saludos y gracias por su ayuda

Última edición por karlic0s; 27/10/2008 a las 09:10