i got a problem
| From: | Luis A | Date: | Wed, 05 Mar 2003 02:29:53 +0000 |
| Subject: | i got a problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-138281@lists.php.net to get a copy of this message | ||
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