Guest User

Proteger un subdirectorio con contraseña

a guest
Jun 9th, 2020
273
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $password = "123456";
  3. if ($_POST['password'] != $password) {
  4. ?>
  5. <h2>Logueate</h2>
  6. <form name="form" method="post" action="">
  7. <input type="password" name="password"><br>
  8. <input type="submit" value="Login"></form>
  9. <?php
  10. }else{
  11. ?>
  12. <script type="text/javascript">
  13. window.location="http://acatusubdirectorio.tupagina.com/nombredelarchivo.html";</script>
  14. <?php
  15. }
  16. ?>
RAW Paste Data