Advertisement
Guest User

Base64 Encode Decoder By Grey Clark

a guest
Feb 18th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <form action="" method="post">
  2. <span>Encode Text</span><br>
  3. <textarea name="encode"></textarea>
  4. <input type="submit" name="submit">
  5. <br>
  6. <span>Decode Text</span><br>
  7. <textarea name="decode"></textarea>
  8. <input type="submit" name="submit-2">
  9. </form>
  10. <?php
  11. if(isset($_POST['submit'])){
  12.  
  13. $encode = $_POST['encode'];
  14.  
  15. $x = base64_encode($encode);
  16.  
  17. echo "<h1 style='color:green; text-align:center;'>Result Box: <h1><textarea style='width:100%; height:700px;'>$x</textarea>";
  18.  
  19. };
  20.  
  21. if(isset($_REQUEST['submit-2'])){
  22.  
  23. $decode = $_REQUEST['decode'];
  24.  
  25. $y = base64_decode($decode);
  26. echo "<h1 style='color:green; text-align:center;'>Result Box: <h1><textarea style='width:100%; height:700px;'>".htmlspecialchars($y)."</textarea>";
  27.  
  28. }; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement