<?php
if (isset($_POST['submit'])) {
$code = $_POST['code'] ;
$code = str_replace('a', ' d ', $code); //replace X by 3 letters forward
$code = str_replace('b', ' e ', $code);
$code = str_replace('c', ' f ', $code);
$code = str_replace('d', ' g ', $code);
$code = str_replace('e', ' h ', $code);
$code = str_replace('f', ' i ', $code);
$code = str_replace('g', ' j ', $code);
$code = str_replace('h', ' k ', $code);
$code = str_replace('i', ' l ', $code);
$code = str_replace('j', ' m ', $code);
$code = str_replace('k', ' n ', $code);
$code = str_replace('l', ' o ', $code);
$code = str_replace('m', ' p ', $code);
$code = str_replace('n', ' q ', $code);
$code = str_replace('o', ' r ', $code);
$code = str_replace('p', ' s ', $code);
$code = str_replace('q', ' t ', $code);
$code = str_replace('r', ' u ', $code);
$code = str_replace('s', ' v ', $code);
$code = str_replace('t', ' w ', $code);
$code = str_replace('u', ' x ', $code);
$code = str_replace('v', ' y ', $code);
$code = str_replace('w', ' z ', $code);
$code = str_replace('x', ' a ', $code);
$code = str_replace('y', ' b ', $code);
$code = str_replace('z', ' c ', $code);
echo "Dit is uw gecodeerde bericht: ".$code."";
}
else{
?>
<form action="?code" method="post">
<input type="text" size="100" name="code" />
<input type="submit" name="submit" value="codeer!" />
<?php
}
?>