If you had a form that looked something like
<FORM action="post.php" method="post">
Enter your text here<BR>
<TEXTAREA name="textin"></TEXTAREA>
<P>
<INPUT type="submit" value="Submit">
</FORM>
When the submit button is hit the program to deal with it could look something like.
<?php
$clnstr=eregi_replace("<SCRIPT", "", $textin);
etc etc
?>
After the replace has been performed you are free to do what ever you want with the string without the script tag. If someone typed "<SCRIPT>naff up the program</SCRIPT>"
the replace would change the string to ">naff up the program</SCRIPT>" which would have no effect in a html environment.
Mark.