Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="" method="post">
- <span>Encode Text</span><br>
- <textarea name="encode"></textarea>
- <input type="submit" name="submit">
- <br>
- <span>Decode Text</span><br>
- <textarea name="decode"></textarea>
- <input type="submit" name="submit-2">
- </form>
- <?php
- if(isset($_POST['submit'])){
- $encode = $_POST['encode'];
- $x = base64_encode($encode);
- echo "<h1 style='color:green; text-align:center;'>Result Box: <h1><textarea style='width:100%; height:700px;'>$x</textarea>";
- };
- if(isset($_REQUEST['submit-2'])){
- $decode = $_REQUEST['decode'];
- $y = base64_decode($decode);
- echo "<h1 style='color:green; text-align:center;'>Result Box: <h1><textarea style='width:100%; height:700px;'>".htmlspecialchars($y)."</textarea>";
- }; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement