Filter Text from the form using php
I have this suggestion form but I don't want people to swear and stuff cuz I put up one last night and I got 350 bad words, links, advertisements, and a whole bunch of stuff...
But anyways I don't know how to filter through words and to see if a variable is too long using strings...
I have the code below of the page...
Code:
<html>
<head>
<style type="text/css">
html,body{
font-family: Trebuchet Ms;
font-size: 12px;
}
.input{
width: 200px;
border: 1px solid #4e4e4e;
padding-left: 3px;
font-family: Trebuchet Ms;
font-size: 16px;
font-weight: bold;
background-color: #FFFFFF;
}
.textarea{
width: 350px;
height: 100px;
border: 1px solid #4e4e4e;
padding-left: 3px;
font-family: Trebuchet Ms;
font-size: 13px;
}
</style>
</head>
<body>
<form action="193.php" method="post" />
<br />Your Display Name:
<br /><input type="text" name="1" class="input"/>
<br />
<br />Your Message:
<br /><textarea class="textarea" name="2"></textarea>
<br />
<br /><input type="submit" class="input" />
</form>
<?php
$dName = $_POST["1"];
$Message = $_POST["2"];
?>
If you explain what to put where and how to edit it pretty well then I can do it... or if you feel that you could just write the code yourself faster than doing that it's fine, it's your choice...