Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Список исключаемых вопросов дня</title>
- </head>
- <body>
- <div style="width:500px;margin:0 auto">
- <?php
- if (isset($_POST['file']) && isset($_POST['password'])) {
- if (md5($_POST['password']) == "md5_hash") {
- file_put_contents("bd.dat", base64_encode($_POST['file']));
- echo " <h1>Вопросы успешно сохранены.</h1>" . PHP_EOL;
- }
- }
- $file = base64_decode(file_get_contents("bd.dat"));
- ?>
- <form method="post" action="">
- <h2>Вопросы:</h2>
- <textarea name="file" style="width:99%;height:200px"><?=$file?></textarea>
- <h2>Пароль:</h2>
- <input type="password" name="password" value="">
- <hr>
- <input type="submit" value="Сохранить">
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement