Advertisement
Guest User

Untitled

a guest
Aug 16th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. <?php
  2. include("obtenerdatos.php");
  3. $user=$_POST['usuario'];
  4. $pass=$_POST['contrasena'];
  5. $ok = 0;
  6. $objeto = new SQLConector;
  7. $lista = $objeto->MostrarUsuario();
  8.  
  9. for($i =0; $i<count($lista); $i++){
  10. if($user==$lista[$i]['usuario'] and $pass==$lista[$i]['password']){
  11. $ok=1;
  12. header("Location:bienvenido.php?user=".$user);
  13. }
  14. }
  15. if ($ok==0){
  16. header("Location:invalido.php");
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement