<?php
error_reporting(0);
//if the length of the string is more than 50 characters let them know
if (strlen($_POST['stringtosend']) > 50){
    echo "go to bed mr president ";
}
$nasties = array('>','>>','<','<<','php','<?','<?php');
$test = str_replace($nasties,'',$_POST['stringtosend']);
addslashes($_POST['stringtosend']);
strip_tags($_POST['stringtosend']);
echo nl2br($test);
?>
<form action ="nl2br.php" method="post">
<textarea name="stringtosend"></textarea>
<input type="submit" name="submit" value="Do Stuff To My String!">
</form>
