Ver Mensaje Individual
  #8 (permalink)  
Antiguo 12/02/2015, 10:47
Avatar de ylellan
ylellan
 
Fecha de Ingreso: mayo-2010
Ubicación: en un lugar de Veracruz
Mensajes: 432
Antigüedad: 13 años, 11 meses
Puntos: 36
Respuesta: rellenar un formulario mediante un boton en php/mysql

Hola, creo que corazon, si estoy de acuerdo que paketetrueke es muy malo y siempre regaña a medio mundo; pero te dire que es uno de los mejores.

Lo que trata el de hacer es que indagues un poco corazon.

Tambien te recomiendo uses las herramientas para postear tu codigo, arriba estan y existen las etiquetas highlight.


asi
Código HTML:
Ver original
  1. <title>Rellenar</title>
  2. <link rel="stylesheet" href="http://localhost/itecia/foros/estilo.css">
  3. </head>
  4.  
  5.  
  6.  
  7. <form action="" method="post" >
  8. <legend>Formulario del alumno</legend>
  9. <br /><br /><br /><br /><br />
  10. <label for="name">Ingresa Identificador:</label>
  11. <input type="text" id="name">
  12.  
  13.  
  14. <input type="submit" value="Buscar" />
  15. <label for="lastname">Identificador:</label>
  16. <input type="text" id="lastname">
  17.  
  18. <label for="lastname">Login:</label>
  19. <input type="text" id="lastname">
  20.  
  21. <label for="name">password:</label>
  22. <input type=password id="name">
  23.  
  24. <label for="lastname">Nombre:</label>
  25. <input type="text" id="lastname">
  26.  
  27. <label for="name">Apellidos:</label>
  28. <input type="text" id="name">
  29.  
  30. <label for="lastname">Direccion:</label>
  31. <input type="text" id="lastname">
  32.  
  33. <label for="name">Correos:</label>
  34. <input type="text" id="name">
  35.  
  36. <label for="lastname">Telefono:</label>
  37. <input type="numeric" id="lastname">
  38.  
  39.  
  40. <input type="submit" value="Modificar" />
  41.  
  42. </form>
  43. </body>
  44. </html>


Te ayudare un poco

Código HTML:
Ver original
  1. <!doctype html>
  2. <meta charset="UTF-8">
  3. <title>Aprendiendo conmigo</title>
  4. </head>
  5. <h1>FOrmularioooo</h1>
  6. <form action="otro.php" method="post">
  7. <label for="nombre">NOMBRE:</label>
  8. <input type="text" name="nombre">
  9. <input type="submit" value="guardar">
  10. </body>

otro.php
Código PHP:
<?php
$nombre
=$_POST['nombre'];
//mete aqui instrucciones de conexion base de datos, no recuedo
$query="INSERT INTO tabla(id,nombre)VALUE('','$nombre')";
$oop=mysql_query=($query) or die ("ups algo salio mal: ".mysql_error());
if(
$oop){
echo 
'excelente se guardo, un beso';
}
else
{
echo 
'No se pudo';
}
//cierras las conexiones
?>
creo que puede ayudarte, besos