untested, but something like this should work
<?
$query = mysql_query("SELECT words FROM profanity");
while($row = mysql_fetch_array($query)) {
if (strstr($row, $username)) {
print "<p align='center'>\n";
print "<font face='arial' size='5'>Registration Error</font></p>\n";
print "<p><font face='arial' size='3'>Sorry, you must not use profanity, "
. "this is a kids site!</font></p>\n";
exit;
} else {
// nothign needs to be here
}
}
// if the script makes it this far (meaning it didn't exit)
// no profanity was found, so do whatever
?>
Cgraz