Ver Mensaje Individual
  #7 (permalink)  
Antiguo 12/11/2008, 10:34
jonis241288
 
Fecha de Ingreso: noviembre-2008
Mensajes: 10
Antigüedad: 16 años, 4 meses
Puntos: 0
Respuesta: problema sistema de noticias

Gracias...ese problema no me salta mas ni me salta ningun otro error pero en el index donde tendria que ver todas las noticias no veo ninguna...
aca les dejo el index y el formulario para cargar las noticias.

INDEX.PHP

<!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=utf-8" />
<title>Sistema de noticias</title>
<?
//conectamos a la base
$connect=mysql_connect("localhost","root","123456" );
//Seleccionamos la base
mysql_select_db("noticias",$connect);
//hacemos las consultas
$result=mysql_query("select * from noticias order by fecha Desc", $connect);
$totalregistros=mysql_num_rows($result);
?>
</head>
<body>
<?
//Recogemos las consultas en un array y las mostramos
while($row=mysql_fetch_array($result)) {
echo "<h2>".$row[titulo]."</h2><br><p>".$row[noticia]."</p><br><div>".$row[autor]." | "
.$row[fecha]." | ".$row[categoria]." | <a href=\"ver.php?id=".$row[id_noticia].
"\">comentarios()</a> | <a href=\"editar.php?id=".$row[id_noticia]."\">editar</a></div>";
/*Hemos puesto los enlaces para "Comentarios" y "Editar" cosa que ocuparemos
más adelante como se puede ver el id nos servirá para casi todo.*/
}
mysql_free_result($result)
?>
</body>
</html>



Formulario: administrar.php
<!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=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>
<body>
<form action="procesanoticia.php" method="post">
Título noticia:<br>
<input type="text" name="titulo"><br>
Autor:<br>
<input type="text" name="autor"><br>
Categoría:<br>
<input type="text" name="categoria"><br>
Escriba el articulo<br>
<textarea name="noticia" cols="50" rows="10"></textarea><br>
<input type="submit" value="Publicar"><br>
</form>

</body>
</html>



Disculpen las molestias y muchisimas gracias!