Ver Mensaje Individual
  #4 (permalink)  
Antiguo 14/12/2015, 16:31
mordvinia
 
Fecha de Ingreso: enero-2015
Mensajes: 48
Antigüedad: 9 años, 3 meses
Puntos: 0
Respuesta: No se envían datos a la base de datos

Coloco nuevamente el php, revisé y vi unos errores, los corregí pero igual no me guarda en la base de datos, solo dice Volver.

Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Documento sin título</title>
  6. </head>
  7.  
  8. <body>
  9. <?php
  10. $conexion = mysql_connect("localhost","root","")or die("problemas en la conexion");
  11. mysql_select_db("escuela",$conexion)or die("problemas en la seleccion de base de datos");
  12. mysql_query("INSERT INTO alumnos(CedulaE,Apellidos,Nombres,Grado,Nacionalidad,Fecha_Nac,LugarNac,Dir_Hab,Telefono,Sangre,Enfermedad,Alergia,CedulaPadre,ApeP,NombreP,DireccionP,TeleP,OcupaP,TrabP,CedulaMadre,ApeM,NomM,DireM,TeleM,OcuM,TrabaM,CedR,ApeR,NomR,DireR,TeleR,OcuR,TrabaR)values ('$_POST[CedulaEscolar]','$_POST[Apellidos]','$_POST[Nombres]','$_POST[Grado]','$_POST[Nacionalidad]','$_POST[FN]','$_POST[L_N]' ,'$_POST[DirHab]','$_POST[Telefono]','$_POST[Sangre]','$_POST[Enfermedades]','$_POST[Alergias]','$_POST[CP]','$_POST[Apellidos4]' ,'$_POST[Nombres4]','$_POST[DirHab4]','$_POST[Telefono2]','$_POST[OcuP]','$_POST[TrabaP]','$_POST[CedulaM]','$_POST[Apellidos2]' ,'$_POST[Nombres2]','$_POST[DirHab2]','$_POST[Telefono2]','$_POST[OcuM]','$_POST[TrabaM]','$_POST[CedulaR]','$_POST[Apellidos3]' ,'$_POST[Nombres3]','$_POST[DirHab3]','$_POST[TelefonoR]','$_POST[OcuR]','$_POST[TrabaR]')",$conexion)or die("problemas en el query");
  13. mysql_close($conexion);
  14. echo "DATOS REGISTRADOS EXITOSAMENTE";
  15. ?>
  16. <div align="center">
  17.   <p>&nbsp;</p>
  18.   <p><a href="index.html" class="N">Volver</a></p>
  19. </div>
  20. </body>
  21. </html>