![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
06/01/2007, 00:27
|
| | Fecha de Ingreso: junio-2006
Mensajes: 66
Antigüedad: 18 años, 8 meses Puntos: 2 | |
Problema al ñadir registro a una db Hola uso este código form.htm
<html>
<body>
<form method="post" action="anadir_registro.php">
Nombre :<input type="Text" name="nombre">
<br>
Dirección:<input type="Text" name="direccion">
<br>
Teléfono :<input type="Text" name="telefono">
<br>
E-mail :<input type="Text" name="email">
<br>
<input type="Submit" name="enviar" value="Aceptar información">
</form>
</body>
</html> anadir_registro.php
<?php
// process form
$link = mysql_connect("localhost", "root", "vertrigo");
mysql_select_db("mydb", $link);
$sql = "INSERT INTO agenda (nombre, direccion, telefono, email)";
$sql .= "VALUES ('$nombre', '$direccion', '$telefono', '$email')";
$result = mysql_query($sql);
echo "¡Gracias! Hemos recibido sus datos.\n";
El problema es que me inserta un nuevo campo en la tabla agenda y rellena las cuatro columnas. Pero en blanco o sea la info no llega.
Cual puede ser el problema |