I tried the code you gave me, but i still gat the error.
I'll post all my codes to see if there are errors.
Conecta.php:
CODE
<?php
$server ="localhost";
$user="71757_eset";
$password="*********";
$dbname="71757_eset_mural";
mysql_connect($server,$user,$password) or die(mysql_error());
mysql_select_db($dbname) or die(mysql_error());
?>
comentarios.php
CODE
<HTML>
<HEAD>
<TITLE>GuestBook</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=utf-8"><STYLE type="text/css">
<!--
body,td,th {
color: #333;
}
body {
background-color: #CCC;
}
a {
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</STYLE></HEAD>
<BODY>
<STRONG>GuestBook</STRONG>
<FORM method="POST" action="cadastra.php">
<P>Titulo:
<INPUT type="text" name="titulo" />
E-mail: <INPUT type="text" name="email" />
Recado:
<TEXTAREA name="recado">Deixe seu recado!</TEXTAREA>
<INPUT type="submit" />
</P>
<P>Recados Postados: </P>
<?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>
cadastra.php
CODE
<?php
include("conecta.php");
$titulo = $_POST['titulo'];
$email = $_POST['email'];
$recado = $_POST['recado'];
$query = "INSERT INTO recados (titulo,email,comentario) VALUES ('$titulo','$email','$recado')";
mysql_query($query) or die (mysql_error());
mysql_close();
header("location:comentatios.php")
?>
I already have the DB"71757_eset_mural" and the table"recados".
I'm brazilian, it's my first guestbook, sorry for using your time for simple things.
Thanks.