Como realizar un registro
Publicado por Alberto (2 intervenciones) el 01/03/2013 20:41:05
Hola a todos, tengo un problema, estoy intentando hacer un formulario para el logeo de un sistema y no me funciona, me da un error, como hago? abajo adjunto el codigo
codigo logeado.php
codigo ingreso.php
codigo logeado.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
require("../DataBase/conexion.php");
$Cedula = $_POST['Cedula'];
$Clave = $_POST['Clave'];
$sql = "SELECT cedula, clave FROM usuario WHERE cedula = ".$Cedula.";";
$a = pg_query($sql);
$registro = pg_fetch_array($a);
if($Cedula == $registro[0] || $Clave == $registro[1]){
echo "Estas Registrado! Bienvenido";
} else {
echo "Error de Usuario Y/o Contraseña";
}
?>
codigo ingreso.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
54
<body>
<div id="">
<div><img src='../imagenes/legal_mpprij.jpg' width="900" height="70"></div>
<form name='PaginaSiguiente' method='POST' action='logeado.php'>
<table class='tabla' style="width:250px; margin-center:325px; margin-top:100px;" align="center">
<tr>
<th colspan='2' class='' align='center'>INGRESO</th>
</tr>
<tr>
<th>
<div align='center'>
<strong>
Cédula:
</strong>
</div>
</th>
<td align='left'>
<input type='text' maxlength='18' size='20' name='Cedula' id='cedula' style="text-transform:uppercase;font-family:Arial;font-weight:bold;" />
</td>
</tr>
<tr>
<th>
<div align='center'>
<strong>
Clave:
</strong>
</div>
</th>
<td align=left>
<input type='password' size='20' maxlength='15' name='Clave' id='clave' style="text-transform:uppercase;font-family:Arial;font-weight:bold;"/>
</td>
</tr>
<tr>
<th colspan='2' align='center'>
<div align='center'>
<input name='button' type='submit' value='Ingresar' />
</div>
</th>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form>
</div>
<div id="footer">
<strong><div align='center'>Todos los derechos reservados. Cuerpo de Policia Nacional Bolivariana © Copyright 2013.</div>
</div>
</center>
</body>
Valora esta pregunta


0