Try
$result = mysql_query($sql) or die(mysql_error());
to see what the problem is.
---John Holmes...
----- Original Message -----
From: "Luis A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 04, 2003 9:29 PM
Subject: [PHP] i got a problem
hi every one here
o got one problem here on the php
take a look at this
<html>
<body>
<form method="post" action="add_reg.php3">
Nombre :<input type="Text" name="nombre"><br>
Tel�fono:<input type="Text" name="telefono"><br>
E-Mail:<input type="Text" name="email"><br>
Pais :<input type="Text" name="pais"><br>
Comentario: <TEXTAREA NAME="comentario" ROWS="10" COLS="25">escriba aqui su
el comentario que desee a�adir</TEXTAREA><br>
<input type="Submit" name="enviar" value="Aceptar informaci�n">
</form>
</body>
</html>
<html>
<body>
<?php
// process form
$db = mysql_connect("localhost", "root");
mysql_select_db("mydb",$db);
$sql = "INSERT INTO agenda (nombre, direccion, telefono, email, pais,
comentario) \n VALUES ('$nombre', '$direccion', '$telefono', '$email',
'$pais', '$comentario')";
$result = mysql_query($sql);
echo "�thanks! we have received your data.\n";
?>
aparently php create the table on the mysql server (he make the connect to
the mysql server) , but he does insert the data from form on the mysql
database
any subjestion??
i realy if ani one of yours please can help me
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php