Ayuda Me aparece este error
Publicado por Dimas Antonio (23 intervenciones) el 20/11/2016 00:10:52
Registrar un nuevo paciente: Registrar
Modificar mis datos: Modificar
Modificar Dato del Plan de un Cliente: Desplegar
Notice: Undefined index: password in C:\xampp\htdocs\Ejercicios\Proyecto Final\RegistroPaciente.php on line 26
Notice: Undefined index: peso in C:\xampp\htdocs\Ejercicios\Proyecto Final\RegistroPaciente.php on line 33
Notice: Undefined index: sangre in C:\xampp\htdocs\Ejercicios\Proyecto Final\RegistroPaciente.php on line 34
Esta Cedula Ya Existe Por Lo Tanto No se Puede Hacer El Registro.
Aqui el codigo de registro
el html
el php
Modificar mis datos: Modificar
Modificar Dato del Plan de un Cliente: Desplegar
Notice: Undefined index: password in C:\xampp\htdocs\Ejercicios\Proyecto Final\RegistroPaciente.php on line 26
Notice: Undefined index: peso in C:\xampp\htdocs\Ejercicios\Proyecto Final\RegistroPaciente.php on line 33
Notice: Undefined index: sangre in C:\xampp\htdocs\Ejercicios\Proyecto Final\RegistroPaciente.php on line 34
Esta Cedula Ya Existe Por Lo Tanto No se Puede Hacer El Registro.
Aqui el codigo de registro
el html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<HTML>
<HEAD>
<TITLE>New Document</TITLE>
</HEAD>
<BODY>
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>Dimas Antonio Mendoza-T00046782-Proyecto Final</TITLE>
<meta charset="utf-8">
</HEAD>
<BODY>
<center><p style="font-family: Fantasy;margin-top: 0px;">Presentado Por: Dimas Antonio Mendoza-T00046782</p></center>
<div>
<form action="RegistroPaciente.html" method="post" style="margin-bottom: 0px;">
<label style="font-family: Fantasy">Quiero Registrarme:</label>
<input type="submit" value="Registrar"/>
<form action="IngresarPaciente.html" method="post" style="margin-bottom: 0px;">
<label style="font-family: Fantasy">Ingresar al sistema:</label>
<input type="submit" value="Ingresar" style="font-family: Fantasy"/>
</form>
<form action="RegistroPaciente.php" method="post" style="margin-bottom: 0px;">
<label style="font-family: Fantasy">Ingrese Su Cedula: (Max 10)</label>
<input type="text" name="cedula" style="font-family: cursive"><br>
<label style="font-family: Fantasy">Ingrese su Usuario: (Max 35)</label>
<input type="text" name="usuario" style="font-family: cursive"><br>
<label style="font-family: Fantasy">Ingrese Sus Password: (Max 35)</label>
<input type="text" name="apellidos" style="font-family: cursive"><br>
<label style="font-family: Fantasy">Ingrese Sus Nombres: (Max 35)</label>
<input type="text" name="nombres" style="font-family: cursive"><br>
<label style="font-family: Fantasy">Ingrese Su Genero:</label>
<select name="genero" style="font-family: cursive">
<option value="M" style="font-family: cursive">Masculino</option>
<option value="F" style="font-family: cursive">Femenino</option>
</select><br>
<label style="font-family: Fantasy">Ingrese Su Telefono: (Max 10)</label>
<input type="text" name="telefono" style="font-family: cursive"><br>
<label style="font-family: Fantasy">Ingrese Su Direccion: </label>
<input type="text" name="direccion" style="font-family: cursive"><br>
<label style="font-family: Fantasy">Ingrese Su Estatura: (Cm)</label>
<input type="text" name="estatura" style="font-family: cursive"><br>
<label style="font-family: Fantasy">Elija Su tipo de sangre:</label>
<select name="plan" style="font-family: cursive">
<option value="0" style="font-family: Fantasy">A+</option>
<option value="1" style="font-family: Fantasy">A-</option>
<option value="2" style="font-family: Fantasy">B+</option>
<option value="3" style="font-family: Fantasy">B-</option>
<option value="4" style="font-family: Fantasy">AB+</option>
<option value="5" style="font-family: Fantasy">AB-</option>
<option value="6" style="font-family: Fantasy">O+</option>
<option value="7" style="font-family: Fantasy">O-</option>
</select><br>
<input type="submit" value="Enviar Datos" style="font-family: Fantasy"/>
</form>
</BODY>
</HTML>
</BODY>
</HTML>
el php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<HTML>
<HEAD>
<TITLE>Dimas Antonio Mendoza-T00046782-Proyecto Final</TITLE>
<meta charset="utf-8">
</HEAD>
<BODY>
<center><p style="font-family: Fantasy;margin-top: 0px;">Presentado Por: Dimas Antonio Mendoza-T00046782</p></center>
<div>
<form action="RegistroPaciente.html" method="post" style="margin-bottom: 0px;">
<label style="font-family: Fantasy">Registrar un nuevo paciente:</label>
<input type="submit" value="Registrar"/>
</form>
<form action="Modificar.html" method="post" style="margin-bottom: 0px;">
<label style="font-family: Fantasy">Modificar mis datos:</label>
<input type="submit" value="Modificar" style="font-family: Fantasy"/>
</form>
<form action="modificar.html" method="post" style="margin-bottom: 0px;">
<label style="font-family: cursive">Modificar Dato del Plan de un Cliente:</label>
<input type="submit" value="Desplegar" style="font-family: Fantasy"/>
</form>
<?php
$cedula = $_POST['cedula'];
$password = $_POST['password'];
$nombres = $_POST['nombres'];
$apellidos = $_POST['nombres'];
$genero= $_POST['genero'];
$telefono = $_POST['telefono'];
$direccion = $_POST['direccion'];
$estatura = $_POST['estatura'];
$peso = $_POST['peso'];
$sangre = $_POST['sangre'];
echo "<br>";
$conexion = new mysqli("localhost", "root", "", "consultoriomedico");
if ($conexion->connect_errno) {
echo "Fallo al conectar a MySQL: (" . $conexion->connect_errno . ") " . $conexion->connect_error;
}
$consulta =mysqli_query($conexion,"SELECT * FROM `pacientes`WHERE `CEDULA` = '$cedula'");
if ($consulta =! $cedula){
$resultados =mysqli_query($conexion,"INSERT INTO `pacientes`(`Cedula`, `Password`, `Apellidos`, `Nombres`, `Usuario`, `Genero`, `Telefono`, `Direccion`, `Estatura`, `Peso`, `Sangre`) VALUES ('$cedula', '$password', '$nombres','$apellidos','$genero','$telefono','$direccion',' $estatura','$peso','$sangre' )");
echo "El usuario Ha Sido Adicionado a La Base de Datos.";
} else{
echo "Esta Cedula Ya Existe Por Lo Tanto No se Puede Hacer El Registro.";
}
?>
</BODY>
</HTML>
Valora esta pregunta


0