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

Hola Yranac!! tengo el codigo como tu me explicaste y sige sin meterme los datos en la BBDD pero el codigo tampoco me da errores, ahora mismo esta así:

<?php

if(isset($_POST['enviar'])){

// process form

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

mysql_select_db("telefonos",$link);

$sql = "INSERT INTO 'telefonos_datos' ('NOMBRE', 'EXTEN_MOVIL', 'TLFNO', 'CABEZA DE GRUPO') ";

$sql .= "VALUES ('".$_POST['nombre']."', '".$_POST['extension']."', '".$_POST['telefono']."', '".$_POST['cabeza_grupo']."')";

$result = mysql_query($sql);

if ($result){ }

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>


Gracias!!