<?
$input = $_REQUEST[input];
$oldtext = $_REQUEST[oldtext];
$newtext = $_REQUEST[newtext];
$input = stripslashes($input);
$newtext = stripslashes($newtext);
$oldtext = stripslashes($oldtext);
?>
<html>
<body bgcolor="#fad888">
<form method="post">
<table border="1">
<tr>
<td>
Input:
<textarea width="100%" growable autoactivate name="input"><? echo "$input"; ?></textarea>
</td>
</tr>
<tr>
<td>
Search For
<textarea width="100%" growable autoactivate name="oldtext"><?
echo "$oldtext"; ?></textarea>
</td>
</tr>
<tr>
<td>
Replace with
<textarea width="100%" growable autoactivate name="newtext"><?
echo "$newtext"; ?></textarea>
</td>
</tr>
<tr>
<td align="center">
<input type="submit">
</td>
</tr>
<tr>
<td>
Output:
<textarea width="100%" growable autoactivate name="output"><?
if ( isset($input) && !empty($input) )
{
$output = str_replace($oldtext, $newtext, $input);
# $output = stripslashes($output);
echo "$output"; }
else { echo ""; }
?></textarea>
</td>
</tr>
</table>
</form>
</body>
</html>