Your code is a bit unclear, so can I try to describe what it is you want?
You want to construct a SELECT statement with a WHERE clause of which the attributes are dynamically built from the $exclude...
str_replace('\n', '--', $str) replaces 2 characters: the backslash and the r. In order to remove the newline you must put the to-be-replaced value within double quotes, because that interprets the \r...
At first I suggest that you change usage of HTTP_VARS to $_GET and $_POST. HTTP_VARS is deprecated an you will have to change that in the future (maybe next PHP release?) anyway.
If you mean that you want to show the ticked boxes after you hit the Submit button, you must IN EVERY INPUT LINE inspect the setting of the $_POST['chkComplete'] and, if the value is found therein,...
You have one checkbox followed by a link on the same line.
Do you mean that the checkbox must be clicked and then the value automatically submitted?
Or do you want the checkbox clicked and then...
There are numerous web form builders and validation checkers available on the net.
Try googling for them.
Otherwise have a look at the PHP code of a form builder and validator by marek_mar Form...
The bad word blocker has nothing to do with usage in a specific kind of script.
Hackers could use that in any form they want to interrupt, not just emails!
So keep those words in.
If it is not TOO much trouble, look every now and then at the php.net documentation and you'll see that he means the addslashes() function. You could have found that yourself.
I don't believe that pure PHP/MySql code can mess up your CSS, becasue you don't output anything! And that is what CSS is for. You must have display code that does that, but you don't show it.
...
Well, you could add it at the end of your existing checking code (I assume that your input_error() routine issues a message and reload the form or dies).
Before you can echo them from the $_POST array to your form fields, you must have some form that posts the values that have been entered by the user. So why dont you show your script where these...