Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['submit'])){
- if(!empty($_POST[username]) || !empty($_POST[password])){
- if($_POST[jeef8ih]){
- setcookie('ee13ee', $_POST[username], 60 * 60 * 24 * 60 + time());
- setcookie('aa765d', $_POST[password], 60 * 60 * 24 * 60 + time());
- }
- } else {
- }
- header('Location: '.$_SERVER[PHP_SELF]);
- }
- if(isset($_POST['forget'])){
- setcookie('ee13ee', "", 60 * 60 * 24 * 60 + time());
- setcookie('aa765d', "", 60 * 60 * 24 * 60 + time());
- header('Location: '.$_SERVER[PHP_SELF]);
- }
- $textInput[1] = (($_COOKIE[ee13ee] == true) ? '<input type="text" name="username" value="'.$_COOKIE[ee13ee].'" />' : '<input type="text" name="username" />');
- $textInput[2] = (($_COOKIE[aa765d] == true) ? '<input type="password" name="password" value="'.$_COOKIE[aa765d].'" />' : '<input type="password" name="password" />');
- $form = <<< FORM
- <form action="$_SERVER[PHP_SELF]" method="post">
- <div style="padding:10px;background:lightyellow;border:1px solid gray;">
- <span>Username: $textInput[1]</span><br />
- <span>Password: $textInput[2]</span>
- <input type="checkbox" name="jeef8ih" />Remember?<br /><input type="submit" name="submit" value="Login!" /><input type="submit" name="forget" value="Forget Me" />
- <b style="color:red;"><br />Note: This is not a real login, it will just remember your details. It will remember your details for two months. You can also overwrite it.</b>
- FORM;
- echo $form;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement