Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/11/2010, 14:16
bmacias
 
Fecha de Ingreso: septiembre-2010
Mensajes: 29
Antigüedad: 13 años, 7 meses
Puntos: 0
Notice: Undefined index:

Hola a todos...

Me aparece el siguiente error.



Aca está el codigo:

************************************************** ***************

<html>
<head>
<title>Ingreso de Estudiantes</title>
</head>
<?
//coneccion a la base de datos
$db_host="localhost";
$db_nombre="man_estudiantes";
$db_user="root";
$db_pass="";
$link=mysql_pconnect($db_host, $db_user, $db_pass) or die ("Error conectando a la base de datos.");
$error=mysql_select_db($db_nombre ,$link) or die("Error seleccionando la base de datos.");

//haciendo el insert
$nombre=$_POST["nombre"]; //Linea 15
$apellido=$_POST["apellido"]; //Linea 16
$direccion=$_POST["direccion"]; //Linea 17
$telefono=$_POST["telefono"]; //Linea 18
$sql = "insert into datos_estudiante (nombre,apellido,direccion,telefono) values ('".$nombre."','".$apellido."','".$direccion."','" .$telefono."')";
$result = mysql_query($sql, $link)or die (mysql_error());
?>
<body>
<form action="mensaje.php" method="post" name="ingreso">
<table align="center" width="400" border="0">
<tr>
<td>&nbsp;</td>
<td align="center"><strong>INGRESO DE ESTUDIANTES</strong></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Nombre:</td>
<td><input type="text" name="nombre" id="nombre">
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Apellido:</td>
<td><input type="text" name="apellido" id="apellido">
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Dirección:</td>
<td><input type="text" name="direccion" id="direccion"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Teléfono:</td>
<td><input type="text" name="telefono" id="telefono"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="center"><input type="submit" name="guardar" id="boton_guardar" value="Guardar">
</td>
<td><a href="index.php">
<input type="button" name="cancelar" id="boton_cancelar" value="Cancelar">
</a></td>
</tr>
</table>

</form>
</body>
</html>

************************************************** ***************

Alguien me podría ayudar con este error.

Gracias.