code php
1 <?php session_start(); ?>
2
3 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
4 <input type="hidden" name="submitted" value="1" />
5 <label for="usuario">Usuario</label>
6 <input type="text" name="usuario" value="" />
7 <label for="password">Password</label>
8 <input type="password" name="password" value="" />
9 <input type="submit" value="Entrar" />
10 </form>
11
12 <?php
13 if (!empty($_POST)):
14 if (isset($_POST['submitted'])):
15 // procesar verificacion de usuario
16 if ( VALID::USER ):
17 // si comprobaste que los datos son correctos y existe
18 else:
19 // si fallo en la autenticacion
20 endif;
21 endif;
22 endif;
23 ?>
Comments
Sign in to leave a comment.

