html>
< head>
< title>Mural de Recados em PHP
< /head>
< body>
< h1>Mural de Recados< /h1>
< form method="POST" action="cadastra.php">
Titulo: < input type="text" name="titulo" />
E-mail: < input type="text" name="email" />
Recado: < textarea name="recado">Deixe seu recado!< /textarea>
< input type="submit" />
< h2>Recados Postados: < /h2>
< ?php
include("conecta.php");
$query = "SELECT * FROM recados ORDER BY id DESC";
$resultado = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_array($resultado)) {
echo "< b>".$row["titulo"]."< /b>";
echo "< br/>";
echo $row["comentario"];
echo "< br/>";
echo "E-mail: < b>".$row["email"]."< /b>";
echo "< br/>< br/>";
}
mysql_close();
? >
< /form>
< /body>
< /html>