Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $nombre = "tu nombre";
- $pass = "tu clave";
- echo 'Bienvenido';
- echo $_COOKIE['Logeado-usuario'];
- if($_POST['login']) {
- if($_POST['user'] == $nombre && $_POST['pass'] == $pass;
- setcookie("Logeado-usuario", $nombre, time() + 120);
- }
- } else {
- ?>
- Login
- <br />
- <br />
- <form method="post" action="prueba.php" >
- User: <input name="user" type="text" /><br />
- Pass: <input name="pass" type="password" />
- <br />
- <br />
- <input type="submit" name="login" value="Entrar" />
- </form>
- <?php } ?>
Add Comment
Please, Sign In to add comment