Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/02/2008, 22:59
Nashin
 
Fecha de Ingreso: febrero-2008
Mensajes: 25
Antigüedad: 16 años, 2 meses
Puntos: 1
Re: Warning en consulta.

gracias.. pero encontre el error
Código:
<? 
$title='Mensaje al Webmaster';
if ($_GET["mensaje"] != "")
{
$conn =mysql_connect ("127.0.0.1","root","");
mysql_select_db("baseprueba");
$qry ="INSERT INTO mensajes (nickname, email, mensajes, fecha) VALUES ('" .$_GET["nickname"]. "', '" .$_GET["email"]. "', '" .$_GET["mensaje"]. "', sysdate())";

$res = mysql_query($qry);
print '<html>
<head>
<title>'.$title.'</title>
</head>
<body>
Mensaje Guardado!
</body>
</html>';
}
else 
{
print '<html>
<head>
<title>'.$title.'</title>
<br><br>
<form action="mensajes.php" metho="get">
<table>
<tr><td>Nickname (Apodo): </td><td><input type="text" name="nickname"></td></tr>
<tr><td>E-mail: </td><td><input type="text" name="email"></td></tr>
<tr><td>Mensaje: </td><td><input type="text" name="mensaje"></td></tr>
<tr><td><input type="submit" value="Grabar"/></td></tr>
</table>
</form>
</body>
</html>';
}
?>
el primer error que tube fue, al if le faltaban los parentecis y el else, y el segundo es como uso el block de notas, no me cambia la sentecias sql, tipo el _get a _GET... y por eso no me funcaba desde ya gracias por responder. y de paso para aprobehcar el post si alguien me puede recomentar un buen editor para trabajar con php... lo fundamental es me puedas nombras las cosas a favor tipo, te resalta las cosas en colores, etc.- gracias.-