Ver Mensaje Individual
  #23 (permalink)  
Antiguo 15/11/2007, 05:16
francibj
 
Fecha de Ingreso: noviembre-2007
Mensajes: 51
Antigüedad: 16 años, 5 meses
Puntos: 0
Re: por que no funciona???

Ahora hace algo diferente: inserto los datos del formulario y en la base de datos aparecen nuevos registros pero en blanco, no tengo ni idea de a que puede deber asi esta el codigo:

<?php
if(isset($_POST['enviar'])){

// process form

$link = mysql_connect("localhost","root","asge");

mysql_select_db("telefonos",$link);

$sql = "INSERT INTO telefonos_datos (NOMBRE__APELLIDOS,EXTEN_MOVIL,TLFNO,CABEZA_DE_GRU PO) ";

$sql .= "VALUES ('".$_POST['nombre__apellidos']."', '".$_POST['extension']."', '".$_POST['tlfno']."', '".$_POST['cabeza_de_grupo']."')";

$result = mysql_query($sql);

if (!$result){ echo mysql_error();

}

echo "¡Gracias! Hemos recibido sus datos.\n";

}else{

?>

</div>
<form method="post" action="<?$_SERVER['PHP_SELF']?>">

<div align="left">Nombre Apellidos:
<input type="Text" name="NOMBRE__APELLIDOS">
<br>

Extensión:
<input type="Text&quo>Dirección:<input type="Text" name="EXTEN_MOVIL">
<br>

Teléfono :
<input type="Text" name="TLFNO">
<br>

Cabeza de grupo :
<input type="Text" name="CABEZA_DE_GRUPO">
<br>

<input type="Submit" name="enviar" value="Aceptar información">

</div>
</form>


<div align="left">
<?php

} //end if

?>


</div>
</body>
</html>