Advertisement
Guest User

Untitled

a guest
May 28th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. web 1
  2. <?php
  3. if(isset($_POST['enviar'])){
  4. $username = $_POST['username'];
  5. $password = $_POST['password'];
  6. }
  7. ?>
  8. <html>
  9. <head>
  10. <title>CIT.SERVEFTP.COM</title>
  11. </head>
  12. <body bgcolor='#080000'>
  13. <form name="formulario" method="post" action="usuarioid.php">
  14. <table border="5" cellpadding="0" cellspacing="0" summary="">
  15. <tr><td align="center"><font color="red">Usuario:</td><td></font><input type="text" size="9" name="username"></td></tr>
  16. <tr><td align="center"><font color="red">Password:</td><td></font><input type="password" size="9" name="password"></td></tr>
  17. <tr><td colspan="2" align="center"><input type="submit" value="Acceder" name="enviar"></td></tr>
  18. </table>
  19. </form>
  20. </body>
  21. </html>
  22.  
  23. web 2
  24. <?php
  25. session_start();
  26. if($_POST["username"] == "123" && $_POST["password"] == "123"){
  27. $_SESSION['username'] = $_POST['username'] ;
  28. $_SESSION['password'] = $_POST['password'] ;
  29. $_SESSION["autenticado"]= "SI";
  30. header ("Location: bienvenido.php");
  31. }
  32. else {
  33. echo "Debes loguearte";
  34. }
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement