I am wondering how to create a Base64 encoder with a form?
Like those websites which you input your text in a text box, press encode button, and the encoded text appears in another text box.
Thanks.
I am wondering how to create a Base64 encoder with a form?
Like those websites which you input your text in a text box, press encode button, and the encoded text appears in another text box.
Thanks.
page.html
<form action="action.php" method="post">
<p>String to base64 encode: <input type="text" name="string" /></p>
<p><input type="submit" /></p>
</form>
action.php
$string = isset($_POST['string']) ? $_POST['string'] : "";
echo base64_encode($string);