ya encontre el error... puse () en vez de []
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
Gracias.. ya se que soy una lata pero ahora me pone esto..Parse error: parse error in f:\appserv\www\guestbook.php on line 11
<?
require($_SERVER[DOCUMENT_ROOT]."/conf/config.php");
$name = $_POST("txt_name");
$len = strlen($name);
if ($len > 0)
{
$mail = $_POST("txt_mail");
$comment = $_POST("txt_comment")
$query = "INSERT INTO guests (autoID, name, mail, comment) VALUES (NULL, '$name', '$mail', '$comment')";
mysql_query($query, $connection) or die(mysql_error());
}
?>
<html>
<head>
<title>Guestbook 1.0 por Mario Garza</title>
</head>
<body>
<center>
<font face="Arial" size="2">
<form action="guestbook.php" name="form" method="POST">
Name: <input type="text" name="txt_name"><br>
E-mail: <input type="text" name="txt_mail"><br><br>
Comment:<br><textarea rows="10" name="txt_comment"></textarea><br>
<input type="submit" value="submit">
</form>
</font>
</center>
</body>
</html>
<?
$db_host="localhost";
$db_user="root";
$db_password="";
$db_name="guestbook";
$connection = mysql_connect($db_host, $db_user, $db_password);
mysql_select_db($db_name, $connection);
?>
