<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>

<form method="post" enctype="multipart/form-data">
<label>Before Encryption</label>
<input type="text" name="original_txt" />
<input type="submit" name="enc_btn" />
<br /> 
encryption functions used
<br /> urlencode(base64_encode(value))
</form>
<br /> <br /> 
<label>After Encryption</label>
<?php
if(isset($_POST['enc_btn']))
{
$original_txt=$_POST['original_txt'];	
echo urlencode(base64_encode($original_txt));
}
?>

<br /> <br /> 

<form method="post" enctype="multipart/form-data">
<label>Encrypted txt</label>
<input type="text" name="decrpt_txt" />
<input type="submit" name="dec_btn" />
<br /> 
decryption functions used
<br /> base64_decode(urldecode(value))
</form>
<br /> <br /> 
<label>After Decryption</label>
<?php
if(isset($_POST['dec_btn']))
{
$decrpt_txt=$_POST['decrpt_txt'];	
echo base64_decode(urldecode($decrpt_txt));
}
?>

</body>
</html>