![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
01/03/2007, 17:51
|
![Avatar de webdesignsite](http://static.forosdelweb.com/customavatars/avatar166702_1.gif) | | | Fecha de Ingreso: enero-2007
Mensajes: 155
Antigüedad: 18 años Puntos: 1 | |
Re: problemas para inserta registros en una bd Cita:
Iniciado por miguel2003 Hola soy nuevo en php y tengo el siguiente problema:
tengo un formulario <form method = "$_post" action = "add_reg.php">
FOLIO :<input type="text" name="folio"><br>
CLIENTE :<input type="text" name="cliente"><br>
FECHA ALTA :<input type="text" name="fecha_alta"><br>
y mi archivo php $link = mysql_connect ("192.0.0.8", "root", "root");
// Selecciona la base de datos
$db = mysql_select_db ("mi base de datos", $link);
$sql = "INSERT INTO alerta (folio, cliente, fecha_alta, ) ";
"VALUES ('$folio, $cliente', '$fecha_alta')";
echo $sql;
$result = mysql_query($sql);
echo $result;
echo "¡GRACIAS HEMOS RECIBIDO SUS DATOS.\n";
pero no logro insertar los registros en la base de datos, se que me falta capturar los datos pasados por el formulario con $_POST pero no se exactamente como, me podrian ayudar?
Gracias
Creo que hay un pequeño detalle a corregir que sería este:
method = "$_post" por "post"
O sea: <form method = "post" action = "add_reg.php">
FOLIO :<input type="text" name="folio"><br>
CLIENTE :<input type="text" name="cliente"><br>
FECHA ALTA :<input type="text" name="fecha_alta"><br>
Probalo!!!
Salu2! |